From 13b0e39412d452809b1fbea02b7fc2fb09cc1d54 Mon Sep 17 00:00:00 2001 From: wit liu <765765346@qq.com> Date: Tue, 23 Dec 2025 14:26:34 +0800 Subject: [PATCH] core/txpool: remove unused function `GetSender` (#1886) --- core/txpool/lending_pool.go | 9 --------- core/txpool/order_pool.go | 9 --------- core/txpool/txpool.go | 8 -------- 3 files changed, 26 deletions(-) diff --git a/core/txpool/lending_pool.go b/core/txpool/lending_pool.go index 62c6b02838..333626c125 100644 --- a/core/txpool/lending_pool.go +++ b/core/txpool/lending_pool.go @@ -405,15 +405,6 @@ func (pool *LendingPool) local() map[common.Address]types.LendingTransactions { return txs } -// GetSender get sender from transaction -func (pool *LendingPool) GetSender(tx *types.LendingTransaction) (common.Address, error) { - from, err := types.LendingSender(pool.signer, tx) - if err != nil { - return common.Address{}, ErrInvalidSender - } - return from, nil -} - func (pool *LendingPool) validateNewLending(cloneStateDb *state.StateDB, cloneLendingStateDb *lendingstate.LendingStateDB, tx *types.LendingTransaction) error { lendingSide := tx.Side() lendingType := tx.Type() diff --git a/core/txpool/order_pool.go b/core/txpool/order_pool.go index a95fdcc481..b946dc2e54 100644 --- a/core/txpool/order_pool.go +++ b/core/txpool/order_pool.go @@ -428,15 +428,6 @@ func (pool *OrderPool) local() map[common.Address]types.OrderTransactions { return txs } -// GetSender get sender from transaction -func (pool *OrderPool) GetSender(tx *types.OrderTransaction) (common.Address, error) { - from, err := types.OrderSender(pool.signer, tx) - if err != nil { - return common.Address{}, ErrInvalidSender - } - return from, nil -} - func (pool *OrderPool) validateOrder(tx *types.OrderTransaction) error { orderSide := tx.Side() orderType := tx.Type() diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index bf5fe9673d..db7e9cba76 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -607,14 +607,6 @@ func (pool *TxPool) local() map[common.Address]types.Transactions { return txs } -func (pool *TxPool) GetSender(tx *types.Transaction) (common.Address, error) { - from, err := types.Sender(pool.signer, tx) - if err != nil { - return common.Address{}, ErrInvalidSender - } - return from, nil -} - // validateTxBasics checks whether a transaction is valid according to the consensus // rules, but does not check state-dependent validation such as sufficient balance. // This check is meant as an early check which only needs to be performed once,