|
|
|
@ -65,6 +65,7 @@ func main() { |
|
|
|
|
profile := flag.Bool("profile", false, "Turn on profiling (CPU, Memory).") |
|
|
|
|
metricsReportURL := flag.String("metrics_report_url", "", "If set, reports metrics to this URL.") |
|
|
|
|
versionFlag := flag.Bool("version", false, "Output version info") |
|
|
|
|
syncNode := flag.Bool("sync_node", false, "Whether this node is a new node joining blockchain and it needs to get synced before joining consensus.") |
|
|
|
|
|
|
|
|
|
flag.Parse() |
|
|
|
|
|
|
|
|
@ -122,6 +123,8 @@ func main() { |
|
|
|
|
attack.GetInstance().SetLogger(consensus.Log) |
|
|
|
|
// Current node.
|
|
|
|
|
currentNode := node.New(consensus, ldb) |
|
|
|
|
// Add sync node configuration.
|
|
|
|
|
currentNode.SyncNode = *syncNode |
|
|
|
|
// Create client peer.
|
|
|
|
|
clientPeer := distributionConfig.GetClientPeer() |
|
|
|
|
// If there is a client configured in the node list.
|
|
|
|
|