plugeth/internal/ethapi
jwasinger 8c288b528d
internal/ethapi: use same state for each invocation within EstimateGas (#27505)
EstimateGas repeatedly executes a transaction, performing a binary search with multiple gas prices to determine proper pricing. Each call retrieves a new copy of the state (https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1017) . Because the pending/latest state can change during the execution of EstimateGas, this can potentially cause strange behavior (as noted here: https://github.com/ethereum/go-ethereum/pull/27502#issue-1761957009).

This PR modifies EstimateGas to retrieve the state once and use a copy of it for every call invocation it does.
2023-06-20 08:40:18 -04:00
..
addrlock.go all: update license information (#16089) 2018-02-14 13:49:11 +01:00
api_test.go internal/ethapi, les: use slices package for sorting (#27492) 2023-06-19 11:33:48 +02:00
api.go internal/ethapi: use same state for each invocation within EstimateGas (#27505) 2023-06-20 08:40:18 -04:00
backend.go all: move main transaction pool into a subpool (#27463) 2023-06-16 15:29:40 +03:00
dbapi.go all: remove concept of public/private API definitions (#25053) 2022-06-21 12:05:43 +03:00
transaction_args_test.go all: move main transaction pool into a subpool (#27463) 2023-06-16 15:29:40 +03:00
transaction_args.go internal,tests: replace noarg fmt.Errorf with errors.New (#27335) 2023-05-25 02:54:28 -04:00