Merge pull request #1233 from cfromknecht/zeroheaders

server: always reply with get headers
This commit is contained in:
Olaoluwa Osuntokun 2018-08-01 16:43:05 -07:00 committed by GitHub
commit f5e261fc9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))