server: always reply with get headers
backport of https://github.com/decred/dcrd/pull/1295
This commit is contained in:
parent
9a2f952402
commit
90c2094cbd
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.
|
||||
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…
Add table
Reference in a new issue