Browse Source

accounts/abi/bind/backends: estimate needed gas, not used

Péter Szilágyi 9 năm trước cách đây
mục cha
commit
e581f2690a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      accounts/abi/bind/backends/simulated.go

+ 1 - 1
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
 }