miner: fix required collateral check
This commit is contained in:
parent
18651ecaa3
commit
b79b826805
@ -247,7 +247,7 @@ func (sma StorageMinerActor) CommitSector(act *types.Actor, vmctx types.VMContex
|
||||
futurePower := types.BigAdd(self.Power, mi.SectorSize)
|
||||
collateralRequired := CollateralForPower(futurePower)
|
||||
|
||||
if types.BigCmp(collateralRequired, act.Balance) < 0 {
|
||||
if types.BigCmp(act.Balance, collateralRequired) < 0 {
|
||||
return nil, aerrors.New(3, "not enough collateral")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user