From da84baf446be257dddc17783581ec81eca712343 Mon Sep 17 00:00:00 2001 From: Minh Doan Date: Wed, 17 Jul 2019 23:02:04 -0700 Subject: [PATCH] add condition to work with mainnet --- node/node_newblock.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/node/node_newblock.go b/node/node_newblock.go index 29ab7e153..ea5d6a98b 100644 --- a/node/node_newblock.go +++ b/node/node_newblock.go @@ -83,6 +83,13 @@ func (node *Node) WaitForConsensusReadyv2(readySignal chan struct{}, stopChan ch viewID := node.Consensus.GetViewID() // add aggregated commit signatures from last block, except for the first two blocks + if node.NodeConfig.GetNetworkType() == nodeconfig.Mainnet { + if err = node.Worker.UpdateCurrent(coinbase); err != nil { + utils.GetLogger().Debug("Failed updating worker's state", "Error", err) + continue + } + } + newBlock, err = node.Worker.Commit(sig, mask, viewID, coinbase) if err != nil {