Skip to content

Commit

Permalink
core/txpool/legacypool,eth,eth/tracers,ethclient,internal/web3ext: re…
Browse files Browse the repository at this point in the history
…move debug_removePendingTransaction
  • Loading branch information
ziogaschr committed Aug 31, 2023
1 parent eade8b2 commit 1e25963
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 23 deletions.
9 changes: 0 additions & 9 deletions core/txpool/legacypool/legacypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{} {
Expand Down
7 changes: 0 additions & 7 deletions eth/api_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
1 change: 0 additions & 1 deletion eth/tracers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down
1 change: 0 additions & 1 deletion ethclient/ethclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,6 @@ var allRPCMethods = []string{
"debug_mutexProfile",
"debug_preimage",
"debug_printBlock",
"debug_removePendingTransaction",
"debug_seedHash",
"debug_setBlockProfileRate",
"debug_setGCPercent",
Expand Down
5 changes: 0 additions & 5 deletions internal/web3ext/web3ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 1e25963

Please sign in to comment.