diff --git a/app/rpc/namespaces/eth/api.go b/app/rpc/namespaces/eth/api.go index 8ce91c2f8c..d91e74f169 100644 --- a/app/rpc/namespaces/eth/api.go +++ b/app/rpc/namespaces/eth/api.go @@ -932,7 +932,8 @@ func (api *PublicEthereumAPI) GetTransactionByHash(hash common.Hash) (*rpctypes. // check if the tx is on the mempool pendingTx, pendingErr := api.PendingTransactionsByHash(hash) if pendingErr != nil { - return nil, err + //to keep consistent with rpc of ethereum, should be return nil + return nil, nil } return pendingTx, nil }