diff --git a/cmd/rpcdaemon/commands/eth_txs.go b/cmd/rpcdaemon/commands/eth_txs.go index 7f32150aa..b0683c3b5 100644 --- a/cmd/rpcdaemon/commands/eth_txs.go +++ b/cmd/rpcdaemon/commands/eth_txs.go @@ -50,6 +50,9 @@ func (api *APIImpl) GetTransactionByHash(ctx context.Context, hash common.Hash) } curHeader := rawdb.ReadCurrentHeader(tx) + if curHeader == nil { + return nil, nil + } // No finalized transaction, try to retrieve it from the pool reply, err := api.txPool.Transactions(ctx, &txpool.TransactionsRequest{Hashes: []*types.H256{gointerfaces.ConvertHashToH256(hash)}})