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