fix(lotus-shed): sanity check start height for dup check

This commit is contained in:
Steven Allen 2021-04-28 17:51:25 -07:00
parent 701682c98a
commit bcfad6b2bb

View File

@ -205,6 +205,9 @@ every day of chain processed.
}
target := abi.ChainEpoch(cctx.Int("start"))
if target < 0 || target > head.Height() {
return fmt.Errorf("start height must be greater than 0 and less than the end height")
}
totalEpochs := head.Height() - target
for target <= head.Height() {