Correct pushGetMerkleBlock throttling.

This commit corrects the check which sends in the done channel when
pushing merkle blocks that have no transactions to go with them.
This commit is contained in:
Dave Collins 2014-07-10 21:41:33 -05:00
parent 06d2707744
commit c7a6645ebe

View file

@ -555,7 +555,7 @@ func (p *peer) pushMerkleBlockMsg(sha *btcwire.ShaHash, doneChan, waitChan chan
// Send the merkleblock. Only send the done channel with this message
// if no transactions will be sent afterwards.
var dc chan bool
if finalValidTxIndex > -1 {
if finalValidTxIndex == -1 {
dc = doneChan
}
p.QueueMessage(merkle, dc)