Fix review comments.

pull/4509/head
frozen 2 years ago committed by Casey Gardiner
parent 96ce60d588
commit 731e17f194
  1. 5
      consensus/consensus.go
  2. 2
      consensus/consensus_v2.go

@ -186,6 +186,11 @@ func (consensus *Consensus) GetLeaderPubKey() *bls_cosi.PublicKeyWrapper {
func (consensus *Consensus) getLeaderPubKey() *bls_cosi.PublicKeyWrapper {
return consensus.LeaderPubKey
}
func (consensus *Consensus) getLeaderPubKey() *bls_cosi.PublicKeyWrapper {
return consensus.LeaderPubKey
}
func (consensus *Consensus) SetLeaderPubKey(pub *bls_cosi.PublicKeyWrapper) {
consensus.pubKeyLock.Lock()
consensus.LeaderPubKey = pub

@ -713,7 +713,7 @@ func (consensus *Consensus) rotateLeader(epoch *big.Int) {
if header == nil {
return
}
// Previous block was epoch block, we should not change leader.
// Previous epoch, we should not change leader.
if header.Epoch().Uint64() != epoch.Uint64() {
return
}

Loading…
Cancel
Save