From 77f1f2ea79b28e8ebeca8149815735f36322ab71 Mon Sep 17 00:00:00 2001 From: bnovil Date: Mon, 16 Oct 2023 15:13:54 +0800 Subject: [PATCH] enhance error check --- 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 cf1960fcf6..405930430b 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1277,7 +1277,7 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr return 0, err } if failed { - if result != nil && result.Err != vm.ErrOutOfGas { + if result != nil && !errors.Is(result.Err, vm.ErrOutOfGas) { if len(result.Revert()) > 0 { return 0, newRevertError(result) }