Quellcode durchsuchen

Merge pull request #14996 from markya0616/send_not_announce

eth: send but not announce block to peers if propagate is true
Péter Szilágyi vor 8 Jahren
Ursprung
Commit
a4da8416ee
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1 0
      eth/handler.go

+ 1 - 0
eth/handler.go

@@ -688,6 +688,7 @@ func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) {
 			peer.SendNewBlock(block, td)
 		}
 		log.Trace("Propagated block", "hash", hash, "recipients", len(transfer), "duration", common.PrettyDuration(time.Since(block.ReceivedAt)))
+		return
 	}
 	// Otherwise if the block is indeed in out own chain, announce it
 	if pm.blockchain.HasBlock(hash) {