From e581f2690ad61a9f74ee14a04ae9746d1a001087 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= <peterke@gmail.com>
Date: Fri, 15 Apr 2016 18:31:18 +0300
Subject: [PATCH] accounts/abi/bind/backends: estimate needed gas, not used

---
 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 213a4f1a7..6cdb9a0cc 100644
--- a/accounts/abi/bind/backends/simulated.go
+++ b/accounts/abi/bind/backends/simulated.go
@@ -152,7 +152,7 @@ func (b *SimulatedBackend) EstimateGasLimit(sender common.Address, contract *com
 	vmenv := core.NewEnv(statedb, chainConfig, b.blockchain, msg, block.Header(), vm.Config{})
 	gaspool := new(core.GasPool).AddGas(common.MaxBig)
 
-	_, gas, err := core.ApplyMessage(vmenv, msg, gaspool)
+	_, gas, _, err := core.NewStateTransition(vmenv, msg, gaspool).TransitionDb()
 	return gas, err
 }
 
-- 
GitLab