Enable consensus retry

pull/1147/head
Rongjian Lan 6 years ago
parent 00b7a0a742
commit a41602b601
  1. 4
      node/node_newblock.go

@ -17,7 +17,7 @@ import (
// Constants of lower bound limit of a new block. // Constants of lower bound limit of a new block.
const ( const (
ConsensusTimeOut = 30 ConsensusTimeOut = 30
PeriodicBlock = 1 * time.Second PeriodicBlock = 200 * time.Millisecond
) )
// WaitForConsensusReadyv2 listen for the readiness signal from consensus and generate new block for consensus. // WaitForConsensusReadyv2 listen for the readiness signal from consensus and generate new block for consensus.
@ -86,7 +86,7 @@ func (node *Node) WaitForConsensusReadyv2(readySignal chan struct{}, stopChan ch
log.Debug("Failed updating worker's state", "Error", err) log.Debug("Failed updating worker's state", "Error", err)
continue 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 {
ctxerror.Log15(utils.GetLogger().Error, ctxerror.Log15(utils.GetLogger().Error,

Loading…
Cancel
Save