diff --git a/consensus/view_change.go b/consensus/view_change.go index 2b6df8bde6..16b2678eb6 100644 --- a/consensus/view_change.go +++ b/consensus/view_change.go @@ -337,7 +337,7 @@ func (consensus *Consensus) startViewChange() { // Ideally, we shall use another variable to keep track of the // leader pubkey in viewchange mode c := consensus.Blockchain().Config() - if c.IsViewChangeSkipValidatorsSameAddressEpoch(currentHeader.Epoch()) { + if c.IsLeaderRotationV2Epoch(currentHeader.Epoch()) { consensus.setLeaderPubKey(consensus.getNextLeaderKeySkipSameAddress(nextViewID, committee)) } else { consensus.setLeaderPubKey(consensus.getNextLeaderKey(nextViewID, committee)) diff --git a/internal/params/config.go b/internal/params/config.go index dcbaf9a473..effdec4a21 100644 --- a/internal/params/config.go +++ b/internal/params/config.go @@ -599,7 +599,7 @@ type ChainConfig struct { // if crosslink are not sent for an entire epoch signed and toSign will be 0 and 0. when that happen, next epoch there will no shard 1 validator elected in the committee. HIP32Epoch *big.Int `json:"hip32-epoch,omitempty"` - ViewChangeSkipValidatorsSameAddressEpoch *big.Int `json:"view-change-skip-validators-same-address-epoch,omitempty"` + LeaderRotationV2Epoch *big.Int `json:"leader-rotation-v2-epoch,omitempty"` } // String implements the fmt.Stringer interface. @@ -879,8 +879,8 @@ func (c *ChainConfig) IsTopMaxRate(epoch *big.Int) bool { return isForked(c.TopMaxRateEpoch, epoch) } -func (c *ChainConfig) IsViewChangeSkipValidatorsSameAddressEpoch(epoch *big.Int) bool { - return isForked(c.ViewChangeSkipValidatorsSameAddressEpoch, epoch) +func (c *ChainConfig) IsLeaderRotationV2Epoch(epoch *big.Int) bool { + return isForked(c.LeaderRotationV2Epoch, epoch) } // During this epoch, shards 2 and 3 will start sending