pull/1996/head
Rongjian Lan 5 years ago
parent 9abd1f8c06
commit d93da67860
  1. 2
      cmd/harmony/main.go
  2. 6
      node/node_newblock.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)
}

@ -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)

Loading…
Cancel
Save