From 517f4a16a6faf3aa4d199b64cabcdeb37aaa1d85 Mon Sep 17 00:00:00 2001 From: JukLee0ira Date: Mon, 23 Dec 2024 17:55:41 +0800 Subject: [PATCH] internal/ethapi: fix Call handle revert error --- internal/ethapi/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 44c39bdc6495..47d50b864f3d 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1448,7 +1448,7 @@ func (s *PublicBlockChainAPI) Call(ctx context.Context, args TransactionArgs, bl return nil, err } // If the result contains a revert reason, try to unpack and return it. - if result.Failed() && len(result.Return()) > 0 { + if result.Failed() { return nil, newRevertError(result.Return()) } return result.Return(), nil