Merge pull request #5403 from filecoin-project/fix/estim-limit-rbf

fix(gas): when estimating GasLimit only apply priors up to the nonce
This commit is contained in:
Jakub Sztandera 2021-01-22 19:43:05 +01:00 committed by GitHub
commit d6c06881ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -229,6 +229,9 @@ func gasEstimateGasLimit(
pending, ts := mpool.PendingFor(fromA)
priorMsgs := make([]types.ChainMsg, 0, len(pending))
for _, m := range pending {
if m.Message.Nonce == msg.Nonce {
break
}
priorMsgs = append(priorMsgs, m)
}