aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
authormark.lin <mark@maicoin.com>2017-08-18 13:52:16 +0800
committermark.lin <mark@maicoin.com>2017-08-18 13:52:16 +0800
commitd4f11d9b4fa294442b3c97bd9c892d14df085363 (patch)
tree8905a652ca1c29c4c9eb55b0cafcdb27c47fefc6 /eth/handler.go
parent0ff35e170d1b913082313089d13e3e6d5490839b (diff)
downloaddexon-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar
dexon-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar.gz
dexon-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar.bz2
dexon-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar.lz
dexon-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar.xz
dexon-d4f11d9b4fa294442b3c97bd9c892d14df085363.tar.zst
dexon-d4f11d9b4fa294442b3c97bd9c892d14df085363.zip
eth: send but not announce block to peers if propagate is true
Diffstat (limited to 'eth/handler.go')
-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) {