[pangaea] temporary pause the harmony nodes on shard0/1

Signed-off-by: Leo Chen <leo@harmony.one>
pull/1371/head
Leo Chen 5 years ago
parent 844ca7ff05
commit 4629f3e9be
  1. 16
      cmd/harmony/main.go

@ -267,6 +267,16 @@ func createGlobalConfig() *nodeconfig.ConfigType {
return nodeConfig
}
func _HarmonyNotice(shardID uint32) {
tick := time.NewTicker(20 * time.Second)
for {
select {
case <-tick.C:
utils.GetLogger().Info("Please wait for the blockain bootstrapping process", "Shard", shardID)
}
}
}
func setupConsensusAndNode(nodeConfig *nodeconfig.ConfigType) *node.Node {
// Consensus object.
// TODO: consensus object shouldn't start here
@ -294,6 +304,12 @@ func setupConsensusAndNode(nodeConfig *nodeconfig.ConfigType) *node.Node {
chainDBFactory := &shardchain.LDBFactory{RootDir: nodeConfig.DBDir}
currentNode := node.New(nodeConfig.Host, currentConsensus, chainDBFactory, *isArchival)
// Temporary Pangaea fix to stop shard0/shard1 nodes, so that the shard can be rebooted
chain := currentNode.Blockchain()
if (chain.ShardID() == uint32(0) || chain.ShardID() == uint32(1)) && core.ShardingSchedule == shardingconfig.PangaeaSchedule {
_HarmonyNotice(chain.ShardID())
}
if *dnsZone != "" {
currentNode.SetDNSZone(*dnsZone)
} else if *dnsFlag {

Loading…
Cancel
Save