Reject transactions for already spent coins (#2935)
## Description Our e2e tests were flaky, example: https://github.com/FuelLabs/fuel-core/actions/runs/14343235447/job/40207476637 The reason was that during transaction reconciliation(after we fixed that), we included transactions that had already been executed and confirmed in the pending pool. After the timeout on the pending pool we will remove all dependent transactions, and in the case of the test, it was a transaction from another test suite that used `Change` output(which already was confirmed and existed on the chain) of the transaction from the first test suite. So basically, the e2e tests revealed that it was possible to submit transactions with already spent inputs, which will be included in the pending pool and later discarded along with all dependent transactions(even if outputs already were stored on the chain as coins). This change rejects transactions immediately, if they use spent coins. TxPool has a `SpentInptus` LRU cache, storing all spent coins. ## Checklist - [x] New behavior is reflected in tests ### Before requesting review - [x] I have reviewed the code myself
G
Green Baneling committed
35de78b5fd3ad6d4f84a1632e6e88dcd43377f2d
Parent: d5993b1
Committed by GitHub <noreply@github.com>
on 4/9/2025, 7:19:56 PM