Fix case where 0 headers are retrieved.

This commit is contained in:
Alex 2017-04-04 16:43:06 -06:00 committed by Olaoluwa Osuntokun
parent dabb8000fb
commit 92f1de6dd9

View file

@ -839,6 +839,9 @@ func (sp *serverPeer) OnGetCFHeaders(_ *peer.Peer, msg *wire.MsgGetCFHeaders) {
peerLog.Warnf("Header lookup failed: %v", err)
return
}
if len(hashList) == 0 {
return
}
// Generate cfheaders message and send it.
headersMsg := wire.NewMsgCFHeaders()