don't include messages that drop the balance below zero
This commit is contained in:
parent
8afceee7a9
commit
12f6119739
@ -750,7 +750,12 @@ func (mp *MessagePool) createMessageChains(actor address.Address, mset map[uint6
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
balance = new(big.Int).Sub(balance, required)
|
balance = new(big.Int).Sub(balance, required)
|
||||||
balance = new(big.Int).Sub(balance, m.Message.Value.Int)
|
|
||||||
|
value := m.Message.Value.Int
|
||||||
|
if balance.Cmp(value) < 0 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
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