|
|
|
@ -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 { |
|
|
|
|