multi: refactor mailbox item handling, more logs#40
multi: refactor mailbox item handling, more logs#40torkelrogstad wants to merge 5 commits intomasterfrom
Conversation
Remove some noisy, and add more correlation IDs
| } | ||
|
|
||
| #[derive(Debug, Serialize, Deserialize)] | ||
| #[derive(Debug, Serialize, Deserialize, strum::Display)] |
There was a problem hiding this comment.
Not sure if a Display impl is a good idea here, debug should be enough.
If you just want to show the discriminant, use https://docs.rs/strum/latest/strum/derive.EnumDiscriminants.html and https://docs.rs/strum/latest/strum/trait.IntoDiscriminant.html
|
|
||
| #[derive(BorshSerialize, Clone, Debug, Deserialize, Serialize)] | ||
| #[derive( | ||
| BorshSerialize, Clone, Debug, Deserialize, Serialize, strum::Display, |
There was a problem hiding this comment.
Not sure if a Display impl is a good idea here, debug should be enough.
If you just want to show the discriminant, use https://docs.rs/strum/latest/strum/derive.EnumDiscriminants.html and https://docs.rs/strum/latest/strum/trait.IntoDiscriminant.html
| HashMap<mainchain_task::Request, HashSet<(SocketAddr, PeerStateId)>>, | ||
|
|
||
| /// PhantomData to use the MainchainTransport type parameter | ||
| _phantom: std::marker::PhantomData<MainchainTransport>, |
There was a problem hiding this comment.
Is this type parameter needed at all here? Looks like the parameter should be on MailboxState::handle_mailbox_item
| } | ||
|
|
||
| #[derive(Debug, strum::Display)] | ||
| enum MailboxItem { |
There was a problem hiding this comment.
Please move this above MailboxState, since it is used in the impl for MailboxState
The idea with the mailbox item handling refactor is to make it possible to add tracing IDs to better figure out what's happening.
There's currently a linter failure here, which I'm not sure how to handle. @Ash-L2L are you able to help?