diff --git a/cmd/rpcdaemon/commands/eth_txs.go b/cmd/rpcdaemon/commands/eth_txs.go index edfb679dd..08868ef4c 100644 --- a/cmd/rpcdaemon/commands/eth_txs.go +++ b/cmd/rpcdaemon/commands/eth_txs.go @@ -3,7 +3,6 @@ package commands import ( "bytes" "context" - "fmt" "math/big" "github.com/ledgerwatch/erigon-lib/gointerfaces" @@ -161,7 +160,7 @@ func (api *APIImpl) GetTransactionByBlockHashAndIndex(ctx context.Context, block txs := block.Transactions() if uint64(txIndex) >= uint64(len(txs)) { - return nil, fmt.Errorf("txIndex (%d) out of range (nTxs: %d)", uint64(txIndex), uint64(len(txs))) + return nil, nil // not error } return newRPCTransaction(txs[txIndex], block.Hash(), block.NumberU64(), uint64(txIndex), block.BaseFee()), nil @@ -211,7 +210,7 @@ func (api *APIImpl) GetTransactionByBlockNumberAndIndex(ctx context.Context, blo txs := block.Transactions() if uint64(txIndex) >= uint64(len(txs)) { - return nil, fmt.Errorf("txIndex (%d) out of range (nTxs: %d)", uint64(txIndex), uint64(len(txs))) + return nil, nil // not error } return newRPCTransaction(txs[txIndex], block.Hash(), block.NumberU64(), uint64(txIndex), block.BaseFee()), nil