From 85fdc490b21d21525ef2cc1cb8e3b39668f9b90c Mon Sep 17 00:00:00 2001 From: Minh Doan Date: Tue, 11 Sep 2018 10:58:08 -0700 Subject: [PATCH] add sync_node flag --- benchmark.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/benchmark.go b/benchmark.go index 2c2d2e115..318cbc933 100644 --- a/benchmark.go +++ b/benchmark.go @@ -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.