From d8cbcbd5d972c412840510fe2aafdf1cde764cf3 Mon Sep 17 00:00:00 2001 From: Nguyen Ba Tam Date: Fri, 26 Oct 2018 09:56:20 +0700 Subject: [PATCH] fix dv m2 validate block detail before broadcast --- eth/fetcher/fetcher.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eth/fetcher/fetcher.go b/eth/fetcher/fetcher.go index 3726d2bacc..bfe6025ea6 100644 --- a/eth/fetcher/fetcher.go +++ b/eth/fetcher/fetcher.go @@ -665,8 +665,8 @@ func (f *Fetcher) insert(peer string, block *types.Block) { return } } - go f.broadcastBlock(block, true) if newBlock.Hash() == block.Hash() { + go f.broadcastBlock(block, true) return } block = newBlock @@ -693,6 +693,7 @@ func (f *Fetcher) insert(peer string, block *types.Block) { // If import succeeded, broadcast the block propAnnounceOutTimer.UpdateSince(block.ReceivedAt) + go f.broadcastBlock(block, true) go f.broadcastBlock(block, false) }()