diff --git a/turbo/jsonrpc/otterscan_api.go b/turbo/jsonrpc/otterscan_api.go index 76072b3dd78..161a8d1388e 100644 --- a/turbo/jsonrpc/otterscan_api.go +++ b/turbo/jsonrpc/otterscan_api.go @@ -67,9 +67,6 @@ type OtterscanAPI interface { GetTransactionError(ctx context.Context, hash common.Hash) (hexutility.Bytes, error) GetTransactionBySenderAndNonce(ctx context.Context, addr common.Address, nonce uint64) (*common.Hash, error) GetContractCreator(ctx context.Context, addr common.Address) (*ContractCreatorData, error) - - // TODO: remove test - TxNum2Block(ctx context.Context, txNum uint64) (uint64, error) } type OtterscanAPIImpl struct { @@ -86,24 +83,6 @@ func NewOtterscanAPI(base *BaseAPI, db kv.TemporalRoDB, maxPageSize uint64) *Ott } } -func (api *OtterscanAPIImpl) TxNum2Block(ctx context.Context, txNum uint64) (uint64, error) { - tx, err := api.db.BeginTemporalRo(ctx) - if err != nil { - return 0, err - } - defer tx.Rollback() - - ok, blockNum, err := rawdbv3.TxNums.FindBlockNum(tx, txNum) - if !ok { - return 0, nil - } - if err != nil { - return 0, err - } - - return blockNum, nil -} - func (api *OtterscanAPIImpl) GetApiLevel() uint8 { return API_LEVEL }