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 {
|
func (f *SlashFilter) MinedBlock(bh *types.BlockHeader, parentEpoch abi.ChainEpoch) error {
|
||||||
if bh.Height > build.UpgradeOrangeHeight-build.Finality &&
|
if build.IsNearUpgrade(bh.Height, build.UpgradeOrangeHeight) {
|
||||||
bh.Height < build.UpgradeOrangeHeight+build.Finality {
|
|
||||||
// consenssus faults disabled during Upgrade Orange
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,12 +109,10 @@ func (ss *syscallShim) VerifyConsensusFault(a, b, extra []byte) (*runtime2.Conse
|
|||||||
}
|
}
|
||||||
|
|
||||||
// workaround chain halt
|
// workaround chain halt
|
||||||
if blockA.Height > build.UpgradeOrangeHeight-build.Finality &&
|
if build.IsNearUpgrade(blockA.Height, build.UpgradeOrangeHeight) {
|
||||||
blockA.Height < build.UpgradeOrangeHeight+build.Finality {
|
|
||||||
return nil, xerrors.Errorf("consensus reporting disabled around Upgrade Orange")
|
return nil, xerrors.Errorf("consensus reporting disabled around Upgrade Orange")
|
||||||
}
|
}
|
||||||
if blockB.Height > build.UpgradeOrangeHeight-build.Finality &&
|
if build.IsNearUpgrade(blockB.Height, build.UpgradeOrangeHeight) {
|
||||||
blockB.Height < build.UpgradeOrangeHeight+build.Finality {
|
|
||||||
return nil, xerrors.Errorf("consensus reporting disabled around Upgrade Orange")
|
return nil, xerrors.Errorf("consensus reporting disabled around Upgrade Orange")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user