From efa2605f26efe84bd307be0704e6b9484af1ffc4 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Sat, 21 Dec 2024 15:56:24 +0800 Subject: [PATCH] accounts/abi/bind/backends: fix wrong gas returned by EstimateGas --- accounts/abi/bind/backends/simulated.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index bbc8f4373ffd..d0c7562e155c 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -368,7 +368,7 @@ func (b *SimulatedBackend) EstimateGas(ctx context.Context, call XDPoSChain.Call b.pendingState.RevertToSnapshot(snapshot) if err != nil { - if err == core.ErrIntrinsicGas { + if errors.Is(err, core.ErrIntrinsicGas) { return true, nil, nil // Special case, raise gas limit } return true, nil, err // Bail out