Account manager, bootnodes, RPC display and sync fixes

This commit is contained in:
Age Manning
2019-09-03 07:50:44 +10:00
parent cd7b6da88e
commit 13b5df56b3
10 changed files with 168 additions and 73 deletions

View File

@@ -47,6 +47,16 @@ impl RPCEvent {
}
}
impl std::fmt::Display for RPCEvent {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
RPCEvent::Request(id, req) => write!(f, "RPC Request(Id: {}, {})", id, req),
RPCEvent::Response(id, res) => write!(f, "RPC Response(Id: {}, {})", id, res),
RPCEvent::Error(id, err) => write!(f, "RPC Request(Id: {}, Error: {:?})", id, err),
}
}
}
/// Implements the libp2p `NetworkBehaviour` trait and therefore manages network-level
/// logic.
pub struct RPC<TSubstream> {