From 8d43e64a1f2e9579352d453d195d1d4d3ebcfead Mon Sep 17 00:00:00 2001 From: Richard Liu Date: Mon, 3 Sep 2018 18:54:41 -0700 Subject: [PATCH] report key. --- consensus/consensus.go | 2 +- consensus/consensus_leader.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/consensus/consensus.go b/consensus/consensus.go index e3cc48f51..be20b0685 100644 --- a/consensus/consensus.go +++ b/consensus/consensus.go @@ -199,5 +199,5 @@ func (consensus *Consensus) String() string { duty = "VLD" // validator } return fmt.Sprintf("[duty:%s, priKey:%s, ShardID:%v, nodeId:%v, state:%s]", - duty, fmt.Sprintf("%x", consensus.priKey), consensus.ShardID, consensus.nodeId, consensus.state) + duty, consensus.priKey.String(), consensus.ShardID, consensus.nodeId, consensus.state) } diff --git a/consensus/consensus_leader.go b/consensus/consensus_leader.go index 3d8ba5084..f23975ddf 100644 --- a/consensus/consensus_leader.go +++ b/consensus/consensus_leader.go @@ -426,6 +426,7 @@ func (consensus *Consensus) reportMetrics(block blockchain.Block) { } } form := url.Values{ + "key": {consensus.pubKey.String()}, "tps": {strconv.FormatFloat(tps, 'f', 2, 64)}, "txCount": {strconv.Itoa(int(numOfTxs))}, "nodeCount": {strconv.Itoa(len(consensus.validators) + 1)},