Add extra check sanity check for timing
This commit is contained in:
parent
82344649d3
commit
a13dfcf96b
@ -308,6 +308,11 @@ func (sma StorageMinerActor) ProveCommitSector(act *types.Actor, vmctx types.VMC
|
|||||||
if !ok {
|
if !ok {
|
||||||
return nil, aerrors.New(1, "no pre-commitment found for sector")
|
return nil, aerrors.New(1, "no pre-commitment found for sector")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if us.SubmitHeight+build.InteractivePoRepDelay > vmctx.BlockHeight() {
|
||||||
|
return nil, aerrors.New(2, "too early for proof submission")
|
||||||
|
}
|
||||||
|
|
||||||
delete(self.PreCommittedSectors, uintToStringKey(params.SectorID))
|
delete(self.PreCommittedSectors, uintToStringKey(params.SectorID))
|
||||||
|
|
||||||
// TODO: ensure normalization to ID address
|
// TODO: ensure normalization to ID address
|
||||||
|
Loading…
Reference in New Issue
Block a user