From d829d227dc843bb257a5865a1c988332b24efdcf Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Sat, 25 Jul 2020 08:24:42 +0000 Subject: [PATCH] [node] set right client group id for non-beacon explorer nodes Signed-off-by: Leo Chen --- cmd/harmony/main.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/cmd/harmony/main.go b/cmd/harmony/main.go index 171990a62..5c4207390 100644 --- a/cmd/harmony/main.go +++ b/cmd/harmony/main.go @@ -486,22 +486,12 @@ func setupConsensusAndNode(nodeConfig *nodeconfig.ConfigType) *node.Node { case "explorer": nodeconfig.SetDefaultRole(nodeconfig.ExplorerNode) currentNode.NodeConfig.SetRole(nodeconfig.ExplorerNode) - currentNode.NodeConfig.SetShardGroupID( - nodeconfig.NewGroupIDByShardID(nodeconfig.ShardID(*shardID)), - ) - currentNode.NodeConfig.SetClientGroupID( - nodeconfig.NewClientGroupIDByShardID(nodeconfig.ShardID(*shardID)), - ) case "validator": nodeconfig.SetDefaultRole(nodeconfig.Validator) currentNode.NodeConfig.SetRole(nodeconfig.Validator) - if nodeConfig.ShardID == shard.BeaconChainShardID { - currentNode.NodeConfig.SetShardGroupID(nodeconfig.NewGroupIDByShardID(shard.BeaconChainShardID)) - } else { - currentNode.NodeConfig.SetShardGroupID(nodeconfig.NewGroupIDByShardID(nodeconfig.ShardID(nodeConfig.ShardID))) - } - currentNode.NodeConfig.SetClientGroupID(nodeconfig.NewClientGroupIDByShardID(shard.BeaconChainShardID)) } + currentNode.NodeConfig.SetShardGroupID(nodeconfig.NewGroupIDByShardID(nodeconfig.ShardID(nodeConfig.ShardID))) + currentNode.NodeConfig.SetClientGroupID(nodeconfig.NewClientGroupIDByShardID(shard.BeaconChainShardID)) currentNode.NodeConfig.ConsensusPriKey = nodeConfig.ConsensusPriKey // This needs to be executed after consensus setup