Merge pull request #1737 from chaosma/viewid-fix

initialize consensus viewID with viewID information stored in header
pull/1754/head
Rongjian Lan 5 years ago committed by GitHub
commit 3e8309423c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      cmd/harmony/main.go

@ -387,11 +387,10 @@ func setupConsensusAndNode(nodeConfig *nodeconfig.ConfigType) *node.Node {
} }
// Set the consensus ID to be the current block number // Set the consensus ID to be the current block number
height := currentNode.Blockchain().CurrentBlock().NumberU64() viewID := currentNode.Blockchain().CurrentBlock().Header().ViewID().Uint64()
currentConsensus.SetViewID(viewID)
currentConsensus.SetViewID(height)
utils.Logger().Info(). utils.Logger().Info().
Uint64("height", height). Uint64("viewID", viewID).
Msg("Init Blockchain") Msg("Init Blockchain")
// Assign closure functions to the consensus object // Assign closure functions to the consensus object

Loading…
Cancel
Save