From 1e259637079ef7bab3a597c7a927390a665f436b Mon Sep 17 00:00:00 2001 From: Chris Ziogas Date: Thu, 31 Aug 2023 14:59:05 +0300 Subject: [PATCH] core/txpool/legacypool,eth,eth/tracers,ethclient,internal/web3ext: remove debug_removePendingTransaction --- core/txpool/legacypool/legacypool.go | 9 --------- eth/api_debug.go | 7 ------- eth/tracers/api.go | 1 - ethclient/ethclient_test.go | 1 - internal/web3ext/web3ext.go | 5 ----- 5 files changed, 23 deletions(-) diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index 3723dfb09f..c44da0b6a8 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -1133,15 +1133,6 @@ func (pool *LegacyPool) removeTx(hash common.Hash, outofbound bool, unreserve bo return 0 } -// RemoveTx publicizes the removeTx method since the API method txpool_removeTx -// needs to allow public access to internal `removeTx()` -func (pool *LegacyPool) RemoveTx(hash common.Hash) *types.Transaction { - tx := pool.Get(hash) - pool.removeTx(hash, true, true) - - return tx.Tx -} - // requestReset requests a pool reset to the new head block. // The returned channel is closed when the reset has occurred. func (pool *LegacyPool) requestReset(oldHead *types.Header, newHead *types.Header) chan struct{} { diff --git a/eth/api_debug.go b/eth/api_debug.go index 3f60f42055..b2293b9ac2 100644 --- a/eth/api_debug.go +++ b/eth/api_debug.go @@ -408,10 +408,3 @@ func (api *DebugAPI) GetAccessibleState(from, to rpc.BlockNumber) (uint64, error } return 0, errors.New("no state found") } - -// RemovePendingTransaction removes a transaction from the txpool. -// It returns the transaction removed, if any. -func (api *DebugAPI) RemovePendingTransaction(hash common.Hash) (*types.Transaction, error) { - // TODO (ziogaschr): add support for RemoveTx in blobpool - return nil, nil -} diff --git a/eth/tracers/api.go b/eth/tracers/api.go index fa5b08f46b..2e4c5caeed 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -302,7 +302,6 @@ func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed break } // Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect - // TODO (ziogaschr): task.statedb.Finalise(api.backend.ChainConfig().IsEIP158(task.block.Number())) task.statedb.Finalise(api.backend.ChainConfig().IsEnabled(api.backend.ChainConfig().GetEIP161dTransition, task.block.Number())) task.results[i] = &txTraceResult{Result: res} } diff --git a/ethclient/ethclient_test.go b/ethclient/ethclient_test.go index a7c2b274b1..366f1ceb6a 100644 --- a/ethclient/ethclient_test.go +++ b/ethclient/ethclient_test.go @@ -1138,7 +1138,6 @@ var allRPCMethods = []string{ "debug_mutexProfile", "debug_preimage", "debug_printBlock", - "debug_removePendingTransaction", "debug_seedHash", "debug_setBlockProfileRate", "debug_setGCPercent", diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index d2f7a04e45..72edd7f97e 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -481,11 +481,6 @@ web3._extend({ call: 'debug_freezeClient', params: 1, }), - new web3._extend.Method({ - name: 'removePendingTransaction', - call: 'debug_removePendingTransaction', - params: 1 - }), new web3._extend.Method({ name: 'getAccessibleState', call: 'debug_getAccessibleState',