Improve logging around handling RPC requests on client

This commit is contained in:
Max Brunsfeld 2022-02-23 15:37:51 -08:00
parent 170487a528
commit e714b00c26
2 changed files with 18 additions and 4 deletions

View file

@ -37,6 +37,7 @@ pub trait AnyTypedEnvelope: 'static + Send + Sync {
fn as_any(&self) -> &dyn Any;
fn into_any(self: Box<Self>) -> Box<dyn Any + Send + Sync>;
fn is_background(&self) -> bool;
fn original_sender_id(&self) -> Option<PeerId>;
}
pub enum MessagePriority {
@ -64,6 +65,10 @@ impl<T: EnvelopedMessage> AnyTypedEnvelope for TypedEnvelope<T> {
fn is_background(&self) -> bool {
matches!(T::PRIORITY, MessagePriority::Background)
}
fn original_sender_id(&self) -> Option<PeerId> {
self.original_sender_id
}
}
macro_rules! messages {