1
0
Fork 0
forked from forks/go-ethereum
go-ethereum-modded-tocallarg/ethclient/simulated
rjl493456442 9089f9461c
eth: add tx to locals only if it has a chance of acceptance (#31618)
This pull request improves error handling for local transaction submissions.

Specifically, if a transaction fails with a temporary error but might be
accepted later, the error will not be returned to the user; instead, the
transaction will be tracked locally for resubmission. 

However, if the transaction fails with a permanent error (e.g., invalid
transaction or insufficient balance), the error will be propagated to the user.

These errors returned in the legacyPool are regarded as temporary failure:

- `ErrOutOfOrderTxFromDelegated`
- `txpool.ErrInflightTxLimitReached`
- `ErrAuthorityReserved`
- `txpool.ErrUnderpriced`
- `ErrTxPoolOverflow`
- `ErrFutureReplacePending`

Notably, InsufficientBalance is also treated as a permanent error, as
it’s highly unlikely that users will transfer funds into the sender account
after submitting the transaction. Otherwise, users may be confused—seeing
their transaction submitted but unaware that the sender lacks sufficient funds—and
continue waiting for it to be included.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
2025-04-17 21:27:48 +02:00
..
backend.go eth/catalyst: set FeeRecipient in dev mode (#31316) 2025-03-17 09:32:44 +01:00
backend_test.go eth: add tx to locals only if it has a chance of acceptance (#31618) 2025-04-17 21:27:48 +02:00
options.go all: use big.Sign to compare with zero (#29490) 2024-04-09 12:14:30 +02:00
options_test.go core: move genesis alloc types to core/types (#29003) 2024-02-16 19:05:33 +01:00
rollback_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00