Add IsNearUpgrade
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
420888aeae
commit
c7e3e9fa7f
@ -28,9 +28,7 @@ func New(dstore ds.Batching) *SlashFilter {
|
||||
}
|
||||
|
||||
func (f *SlashFilter) MinedBlock(bh *types.BlockHeader, parentEpoch abi.ChainEpoch) error {
|
||||
if bh.Height > build.UpgradeOrangeHeight-build.Finality &&
|
||||
bh.Height < build.UpgradeOrangeHeight+build.Finality {
|
||||
// consenssus faults disabled during Upgrade Orange
|
||||
if build.IsNearUpgrade(bh.Height, build.UpgradeOrangeHeight) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -109,12 +109,10 @@ func (ss *syscallShim) VerifyConsensusFault(a, b, extra []byte) (*runtime2.Conse
|
||||
}
|
||||
|
||||
// workaround chain halt
|
||||
if blockA.Height > build.UpgradeOrangeHeight-build.Finality &&
|
||||
blockA.Height < build.UpgradeOrangeHeight+build.Finality {
|
||||
if build.IsNearUpgrade(blockA.Height, build.UpgradeOrangeHeight) {
|
||||
return nil, xerrors.Errorf("consensus reporting disabled around Upgrade Orange")
|
||||
}
|
||||
if blockB.Height > build.UpgradeOrangeHeight-build.Finality &&
|
||||
blockB.Height < build.UpgradeOrangeHeight+build.Finality {
|
||||
if build.IsNearUpgrade(blockB.Height, build.UpgradeOrangeHeight) {
|
||||
return nil, xerrors.Errorf("consensus reporting disabled around Upgrade Orange")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user