diff options
author | mark.lin <mark@maicoin.com> | 2017-08-18 13:52:16 +0800 |
---|---|---|
committer | mark.lin <mark@maicoin.com> | 2017-08-18 13:52:16 +0800 |
commit | d4f11d9b4fa294442b3c97bd9c892d14df085363 (patch) | |
tree | 8905a652ca1c29c4c9eb55b0cafcdb27c47fefc6 /eth | |
parent | 0ff35e170d1b913082313089d13e3e6d5490839b (diff) | |
download | go-tangerine-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar go-tangerine-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar.gz go-tangerine-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar.bz2 go-tangerine-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar.lz go-tangerine-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar.xz go-tangerine-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar.zst go-tangerine-d4f11d9b4fa294442b3c97bd9c892d14df085363.zip |
eth: send but not announce block to peers if propagate is true
Diffstat (limited to 'eth')
-rw-r--r-- | eth/handler.go | 1 |
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) { |