Add LastEpochInCommittee at prestaking epoch too (#3016)

pull/3018/head
Rongjian Lan 5 years ago committed by GitHub
parent ac977cfd9d
commit c09b3c3af7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      internal/chain/engine.go
  2. 1
      staking/availability/measure.go

@ -248,11 +248,12 @@ func (e *engineImpl) Finalize(
isBeaconChain := header.ShardID() == shard.BeaconChainShardID
isNewEpoch := len(header.ShardState()) > 0
inPreStakingEra := chain.Config().IsPreStaking(header.Epoch())
inStakingEra := chain.Config().IsStaking(header.Epoch())
// Process Undelegations, set LastEpochInCommittee and set EPoS status
// Needs to be before AccumulateRewardsAndCountSigs
if isBeaconChain && isNewEpoch && inStakingEra {
if isBeaconChain && isNewEpoch && inPreStakingEra {
if err := payoutUndelegations(chain, header, state); err != nil {
return nil, nil, err
}

@ -205,6 +205,7 @@ func ComputeAndMutateEPOSStatus(
wrapper.Status = effective.Inactive
utils.Logger().Info().
Str("threshold", measure.String()).
Interface("computed", computed).
Msg("validator failed availability threshold, set to inactive")
default:
// Default is no-op so validator who wants

Loading…
Cancel
Save