mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
Fix e2e flakynes for new state mgmt (#5790)
This commit is contained in:
parent
a25354adf0
commit
419343123a
@ -43,6 +43,18 @@ func (s *Service) getBlockPreState(ctx context.Context, b *ethpb.BeaconBlock) (*
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// For new state management, this ensures the state does not get mutated since initial syncing
|
||||
// uses verifyBlkPreState.
|
||||
if featureconfig.Get().NewStateMgmt {
|
||||
preState, err = s.stateGen.StateByRoot(ctx, bytesutil.ToBytes32(b.ParentRoot))
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "could not get pre state for slot %d", b.Slot)
|
||||
}
|
||||
if preState == nil {
|
||||
return nil, errors.Wrapf(err, "nil pre state for slot %d", b.Slot)
|
||||
}
|
||||
}
|
||||
|
||||
// Verify block slot time is not from the feature.
|
||||
if err := helpers.VerifySlotTime(preState.GenesisTime(), b.Slot, helpers.TimeShiftTolerance); err != nil {
|
||||
return nil, err
|
||||
|
@ -433,4 +433,5 @@ var E2EBeaconChainFlags = []string{
|
||||
"--check-head-state",
|
||||
"--enable-state-field-trie",
|
||||
"--enable-state-ref-copy",
|
||||
"--enable-new-state-mgmt",
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user