diff --git a/peer.go b/peer.go index 16047daa..eed6c552 100644 --- a/peer.go +++ b/peer.go @@ -1670,7 +1670,7 @@ out: // Create and send as many inv messages as needed to // drain the inventory send queue. - invMsg := wire.NewMsgInv() + invMsg := wire.NewMsgInvSizeHint(uint(invSendQueue.Len())) for e := invSendQueue.Front(); e != nil; e = invSendQueue.Front() { iv := invSendQueue.Remove(e).(*wire.InvVect) @@ -1685,7 +1685,7 @@ out: waiting = queuePacket( outMsg{msg: invMsg}, pendingMsgs, waiting) - invMsg = wire.NewMsgInv() + invMsg = wire.NewMsgInvSizeHint(uint(invSendQueue.Len())) } // Add the inventory that is being relayed to