add condition to work with mainnet

pull/1223/head
Minh Doan 5 years ago committed by Minh Doan
parent 78d1a52fd9
commit da84baf446
  1. 7
      node/node_newblock.go

@ -83,6 +83,13 @@ func (node *Node) WaitForConsensusReadyv2(readySignal chan struct{}, stopChan ch
viewID := node.Consensus.GetViewID() viewID := node.Consensus.GetViewID()
// add aggregated commit signatures from last block, except for the first two blocks // 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) newBlock, err = node.Worker.Commit(sig, mask, viewID, coinbase)
if err != nil { if err != nil {

Loading…
Cancel
Save