|
|
@ -812,7 +812,7 @@ func setupConsensusAndNode(hc harmonyconfig.HarmonyConfig, nodeConfig *nodeconfi |
|
|
|
|
|
|
|
|
|
|
|
registry = setupChain(hc, nodeConfig, registry) |
|
|
|
registry = setupChain(hc, nodeConfig, registry) |
|
|
|
if registry.GetShardChainCollection() == nil { |
|
|
|
if registry.GetShardChainCollection() == nil { |
|
|
|
panic("shard chain collection is nil1111111") |
|
|
|
panic("shard chain collection is nil") |
|
|
|
} |
|
|
|
} |
|
|
|
registry.SetWebHooks(nodeConfig.WebHooks.Hooks) |
|
|
|
registry.SetWebHooks(nodeConfig.WebHooks.Hooks) |
|
|
|
cxPool := core.NewCxPool(core.CxPoolSize) |
|
|
|
cxPool := core.NewCxPool(core.CxPoolSize) |
|
|
@ -862,14 +862,6 @@ func setupConsensusAndNode(hc harmonyconfig.HarmonyConfig, nodeConfig *nodeconfi |
|
|
|
currentNode.NodeConfig.SetClientGroupID(nodeconfig.NewClientGroupIDByShardID(shard.BeaconChainShardID)) |
|
|
|
currentNode.NodeConfig.SetClientGroupID(nodeconfig.NewClientGroupIDByShardID(shard.BeaconChainShardID)) |
|
|
|
currentNode.NodeConfig.ConsensusPriKey = nodeConfig.ConsensusPriKey |
|
|
|
currentNode.NodeConfig.ConsensusPriKey = nodeConfig.ConsensusPriKey |
|
|
|
|
|
|
|
|
|
|
|
// This needs to be executed after consensus setup
|
|
|
|
|
|
|
|
if err := currentConsensus.InitConsensusWithValidators(); err != nil { |
|
|
|
|
|
|
|
utils.Logger().Warn(). |
|
|
|
|
|
|
|
Int("shardID", hc.General.ShardID). |
|
|
|
|
|
|
|
Err(err). |
|
|
|
|
|
|
|
Msg("InitConsensusWithMembers failed") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set the consensus ID to be the current block number
|
|
|
|
// Set the consensus ID to be the current block number
|
|
|
|
viewID := currentNode.Blockchain().CurrentBlock().Header().ViewID().Uint64() |
|
|
|
viewID := currentNode.Blockchain().CurrentBlock().Header().ViewID().Uint64() |
|
|
|
currentConsensus.SetViewIDs(viewID + 1) |
|
|
|
currentConsensus.SetViewIDs(viewID + 1) |
|
|
|