Merge pull request #1233 from cfromknecht/zeroheaders
server: always reply with get headers
This commit is contained in:
commit
f5e261fc9e
1 changed files with 0 additions and 4 deletions
|
@ -742,10 +742,6 @@ func (sp *serverPeer) OnGetHeaders(_ *peer.Peer, msg *wire.MsgGetHeaders) {
|
||||||
// This mirrors the behavior in the reference implementation.
|
// This mirrors the behavior in the reference implementation.
|
||||||
chain := sp.server.chain
|
chain := sp.server.chain
|
||||||
headers := chain.LocateHeaders(msg.BlockLocatorHashes, &msg.HashStop)
|
headers := chain.LocateHeaders(msg.BlockLocatorHashes, &msg.HashStop)
|
||||||
if len(headers) == 0 {
|
|
||||||
// Nothing to send.
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send found headers to the requesting peer.
|
// Send found headers to the requesting peer.
|
||||||
blockHeaders := make([]*wire.BlockHeader, len(headers))
|
blockHeaders := make([]*wire.BlockHeader, len(headers))
|
||||||
|
|
Loading…
Add table
Reference in a new issue