From 28212f7abd9a717363a8deef88890495453d7254 Mon Sep 17 00:00:00 2001 From: KamiD <44460798+KamiD@users.noreply.github.com> Date: Mon, 16 Aug 2021 14:52:06 +0800 Subject: [PATCH] =?UTF-8?q?Merge=20PR=20=EF=BC=9Afix=20inconsistent=20erro?= =?UTF-8?q?r=20result=20with=20ethereum=20rpc=20(#969)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/rpc/namespaces/eth/api.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 }