From d4f11d9b4fa294442b3c97bd9c892d14df085363 Mon Sep 17 00:00:00 2001 From: "mark.lin" Date: Fri, 18 Aug 2017 13:52:16 +0800 Subject: [PATCH] eth: send but not announce block to peers if propagate is true --- eth/handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/eth/handler.go b/eth/handler.go index 6c64493401..e6a9c86d79 100644 --- a/eth/handler.go +++ b/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) {