This commit is contained in:
antiochp 2018-11-16 14:34:05 +00:00
parent 4b48eebdfe
commit f7608f5b9c
No known key found for this signature in database
GPG key ID: 49CBDBCE8AB061C1
2 changed files with 8 additions and 4 deletions

View file

@ -261,7 +261,9 @@ fn poll<H>(
received_bytes.inc(MsgHeader::LEN as u64 + msg.header.msg_len); 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())); try_break!(error_tx, resp.write(sent_bytes.clone()));
} }
} }

View file

@ -185,9 +185,11 @@ impl MessageHandler for Protocol {
let headers = adapter.locate_headers(loc.hashes); let headers = adapter.locate_headers(loc.hashes);
// serialize and send all the headers over // serialize and send all the headers over
Ok(Some( Ok(Some(Response::new(
Response::new(Type::Headers, Headers { headers }, writer), Type::Headers,
)) Headers { headers },
writer,
)))
} }
// "header first" block propagation - if we have not yet seen this block // "header first" block propagation - if we have not yet seen this block