From b082769ea55b807451e72c3f9bc5d8cd0c52cbcb 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 low gas bug in 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 12005705c710..f40bb4dd24b6 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