File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2274,12 +2274,12 @@ func (s *server) handleRelayInvMsg(state *peerState, msg relayMsg) {
22742274// handleRelayCmpctBlock deals with direct relaying a compact block to
22752275// peers which both want a compact block and accept direct relay.
22762276func (s * server ) handleRelayCmpctBlock (state * peerState , msg * wire.MsgCmpctBlock ) {
2277+ blockHash := msg .BlockHash ()
2278+ iv := wire .NewInvVect (wire .InvTypeBlock , & blockHash )
22772279 state .forAllPeers (func (sp * serverPeer ) {
22782280 if sp .WantsCompactBlocks () && sp .WantsDirectBlockRelay () &&
2279- sp .ProtocolVersion () >= wire .NoValidationRelayVersion {
2281+ sp .ProtocolVersion () >= wire .NoValidationRelayVersion && ! sp . HasKnownInventory ( iv ) {
22802282
2281- blockHash := msg .BlockHash ()
2282- iv := wire .NewInvVect (wire .InvTypeBlock , & blockHash )
22832283 sp .AddKnownInventory (iv )
22842284 sp .QueueMessage (msg , nil )
22852285 }
You can’t perform that action at this time.
0 commit comments