aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-08-18 17:47:33 +0800
committerGitHub <noreply@github.com>2017-08-18 17:47:33 +0800
commita4da8416eec6a00c358b6a612d21e7cdf859d588 (patch)
tree95b688d214ad1bfa8bc84bb810b7c81087c46ef0 /eth
parent998abb910776f61fcea1d9350b157994abf5224b (diff)
parentd4f11d9b4fa294442b3c97bd9c892d14df085363 (diff)
downloadgo-tangerine-a4da8416eec6a00c358b6a612d21e7cdf859d588.tar
go-tangerine-a4da8416eec6a00c358b6a612d21e7cdf859d588.tar.gz
go-tangerine-a4da8416eec6a00c358b6a612d21e7cdf859d588.tar.bz2
go-tangerine-a4da8416eec6a00c358b6a612d21e7cdf859d588.tar.lz
go-tangerine-a4da8416eec6a00c358b6a612d21e7cdf859d588.tar.xz
go-tangerine-a4da8416eec6a00c358b6a612d21e7cdf859d588.tar.zst
go-tangerine-a4da8416eec6a00c358b6a612d21e7cdf859d588.zip
Merge pull request #14996 from markya0616/send_not_announce
eth: send but not announce block to peers if propagate is true
Diffstat (limited to 'eth')
-rw-r--r--eth/handler.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/eth/handler.go b/eth/handler.go
index 6c6449340..e6a9c86d7 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) {