use RequiredFunds in chain inclusion balance sanity check
This commit is contained in:
parent
06a13681ae
commit
b4be1472c0
@ -188,11 +188,13 @@ func (mp *MessagePool) createMessageChains(actor address.Address, mset *msgSet,
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
gasReward := mp.getGasReward(m, ts)
|
required := m.Message.RequiredFunds().Int
|
||||||
if gasReward.Cmp(balance) > 0 {
|
if balance.Cmp(required) < 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
balance = new(big.Int).Sub(balance, gasReward)
|
balance = new(big.Int).Sub(balance, required)
|
||||||
|
|
||||||
|
gasReward := mp.getGasReward(m, ts)
|
||||||
rewards = append(rewards, gasReward)
|
rewards = append(rewards, gasReward)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user