Merge pull request #4668 from filecoin-project/fix/mpool-pricing
Fix messagepool accounting
This commit is contained in:
commit
696a6867dd
@ -752,11 +752,10 @@ func (mp *MessagePool) createMessageChains(actor address.Address, mset map[uint6
|
|||||||
balance = new(big.Int).Sub(balance, required)
|
balance = new(big.Int).Sub(balance, required)
|
||||||
|
|
||||||
value := m.Message.Value.Int
|
value := m.Message.Value.Int
|
||||||
if balance.Cmp(value) >= 0 {
|
if balance.Cmp(value) < 0 {
|
||||||
// Note: we only account for the value if the balance doesn't drop below 0
|
break
|
||||||
// otherwise the message will fail and the miner can reap the gas rewards
|
|
||||||
balance = new(big.Int).Sub(balance, value)
|
|
||||||
}
|
}
|
||||||
|
balance = new(big.Int).Sub(balance, value)
|
||||||
|
|
||||||
gasReward := mp.getGasReward(m, baseFee)
|
gasReward := mp.getGasReward(m, baseFee)
|
||||||
rewards = append(rewards, gasReward)
|
rewards = append(rewards, gasReward)
|
||||||
|
Loading…
Reference in New Issue
Block a user