diff --git a/p2p/src/conn.rs b/p2p/src/conn.rs index db029d693..3157669c9 100644 --- a/p2p/src/conn.rs +++ b/p2p/src/conn.rs @@ -261,7 +261,9 @@ fn poll( received_bytes.inc(MsgHeader::LEN as u64 + msg.header.msg_len); } - if let Some(Some(resp)) = try_break!(error_tx, handler.consume(msg, &mut writer, received)) { + if let Some(Some(resp)) = + try_break!(error_tx, handler.consume(msg, &mut writer, received)) + { try_break!(error_tx, resp.write(sent_bytes.clone())); } } diff --git a/p2p/src/protocol.rs b/p2p/src/protocol.rs index 8dd644556..de9b7174a 100644 --- a/p2p/src/protocol.rs +++ b/p2p/src/protocol.rs @@ -185,9 +185,11 @@ impl MessageHandler for Protocol { let headers = adapter.locate_headers(loc.hashes); // serialize and send all the headers over - Ok(Some( - Response::new(Type::Headers, Headers { headers }, writer), - )) + Ok(Some(Response::new( + Type::Headers, + Headers { headers }, + writer, + ))) } // "header first" block propagation - if we have not yet seen this block