mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-20 10:11:49 +01:00
Merge pull request #1233 from cfromknecht/zeroheaders
server: always reply with get headers
This commit is contained in:
commit
f5e261fc9e
@ -742,10 +742,6 @@ func (sp *serverPeer) OnGetHeaders(_ *peer.Peer, msg *wire.MsgGetHeaders) {
|
||||
// This mirrors the behavior in the reference implementation.
|
||||
chain := sp.server.chain
|
||||
headers := chain.LocateHeaders(msg.BlockLocatorHashes, &msg.HashStop)
|
||||
if len(headers) == 0 {
|
||||
// Nothing to send.
|
||||
return
|
||||
}
|
||||
|
||||
// Send found headers to the requesting peer.
|
||||
blockHeaders := make([]*wire.BlockHeader, len(headers))
|
||||
|
Loading…
Reference in New Issue
Block a user