add total_diff to ping/pong msgs (#350)
* add total_diff to ping/pong msgs debug log for total_diff on each ping/pong * expose peer addr to the handle_payload fn so we know where it came from * fix p2p tests for ping * default to 0 if we cannot read total_difficulty * updating a connected peer in place * actually update peer info diff * fixup p2p tests
This commit is contained in:
@@ -247,6 +247,7 @@ impl Handler for PeersConnectedHandler {
|
||||
fn handle(&self, _req: &mut Request) -> IronResult<Response> {
|
||||
let mut peers = vec![];
|
||||
for p in &self.p2p_server.all_peers() {
|
||||
let p = p.read().unwrap();
|
||||
let peer_info = p.info.clone();
|
||||
peers.push(peer_info);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user