From d93da67860a20cee204d851e9eb79b0c03e425d9 Mon Sep 17 00:00:00 2001 From: Rongjian Lan Date: Sun, 8 Dec 2019 21:06:16 -0800 Subject: [PATCH] fix lint --- cmd/harmony/main.go | 2 +- node/node_newblock.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/harmony/main.go b/cmd/harmony/main.go index 4088d9384..1ca23ce70 100644 --- a/cmd/harmony/main.go +++ b/cmd/harmony/main.go @@ -294,7 +294,7 @@ func setupConsensusAndNode(nodeConfig *nodeconfig.ConfigType) *node.Node { return currentConsensus.PubKey, nil }) - if initialAccount.Address != "" { // staking validator doesn't have to specify ECDSA address + if initialAccount.Address != "" { // staking validator doesn't have to specify ECDSA address currentConsensus.SelfAddress = common.ParseAddr(initialAccount.Address) } diff --git a/node/node_newblock.go b/node/node_newblock.go index fdb0299f4..b1b58a226 100644 --- a/node/node_newblock.go +++ b/node/node_newblock.go @@ -85,9 +85,9 @@ func (node *Node) proposeNewBlock() (*types.Block, error) { // Update worker's current header and state data in preparation to propose/process new transactions var ( - coinbase = node.Consensus.SelfAddress + coinbase = node.Consensus.SelfAddress beneficiary = coinbase - err error + err error ) // After staking, all coinbase will be the address of bls pub key @@ -96,7 +96,7 @@ func (node *Node) proposeNewBlock() (*types.Block, error) { if bytes.Compare(coinbase[:], addr[:]) == 0 { // empty SelfAddress means it's a staking validator blsPubKeyBytes := node.Consensus.PubKey.GetAddress() addr.SetBytes(blsPubKeyBytes[:]) - coinbase = addr // coinbase will be the bls address + coinbase = addr // coinbase will be the bls address // validator's ecdsa address node.Worker.GetCurrentHeader().SetCoinbase(coinbase)