diff --git a/cmd/rpcdaemon/commands/eth_txs.go b/cmd/rpcdaemon/commands/eth_txs.go index d72d6c22e..edfb679dd 100644 --- a/cmd/rpcdaemon/commands/eth_txs.go +++ b/cmd/rpcdaemon/commands/eth_txs.go @@ -81,6 +81,12 @@ func (api *APIImpl) GetTransactionByHash(ctx context.Context, hash common.Hash) if err != nil { return nil, err } + + // if no transactiion was found in the txpool then we return nil and an error warning that we didn't find the transaction by the hash + if txn == nil { + return nil, nil + } + return newRPCPendingTransaction(txn, curHeader, chainConfig), nil }