mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
fix bad merge - missing support for header msg type (#690)
This commit is contained in:
parent
e485c158f3
commit
78a6447a09
1 changed files with 13 additions and 1 deletions
|
@ -141,6 +141,18 @@ impl MessageHandler for Protocol {
|
|||
return Ok(Some((header_bytes, Type::Headers)));
|
||||
}
|
||||
|
||||
// "header first" block propagation - if we have not yet seen this block
|
||||
// we can go request it from some of our peers
|
||||
Type::Header => {
|
||||
let header: core::BlockHeader = msg.body()?;
|
||||
|
||||
adapter.header_received(header, self.addr);
|
||||
|
||||
// we do not return a hash here as we never request a single header
|
||||
// a header will always arrive unsolicited
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
Type::Headers => {
|
||||
let headers: Headers = msg.body()?;
|
||||
adapter.headers_received(headers.headers, self.addr);
|
||||
|
|
Loading…
Reference in a new issue