aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind/backends/simulated.go
diff options
context:
space:
mode:
authorJeff Prestes <jeffprestes@gmail.com>2018-08-15 15:15:42 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-08-15 15:15:42 +0800
commit212bba47ff13812ddabb642da463e58cda4ff20f (patch)
tree229ddaf6591d031b782e692fb75ce6bc35dd225d /accounts/abi/bind/backends/simulated.go
parentb52bb31b767a3e31266e6138e24f7226ebbd8882 (diff)
downloaddexon-212bba47ff13812ddabb642da463e58cda4ff20f.tar
dexon-212bba47ff13812ddabb642da463e58cda4ff20f.tar.gz
dexon-212bba47ff13812ddabb642da463e58cda4ff20f.tar.bz2
dexon-212bba47ff13812ddabb642da463e58cda4ff20f.tar.lz
dexon-212bba47ff13812ddabb642da463e58cda4ff20f.tar.xz
dexon-212bba47ff13812ddabb642da463e58cda4ff20f.tar.zst
dexon-212bba47ff13812ddabb642da463e58cda4ff20f.zip
backends: configurable gas limit to allow testing large contracts (#17358)
* backends: increase gaslimit in order to allow tests of large contracts * backends: increase gaslimit in order to allow tests of large contracts * backends: increase gaslimit in order to allow tests of large contracts
Diffstat (limited to 'accounts/abi/bind/backends/simulated.go')
-rw-r--r--accounts/abi/bind/backends/simulated.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go
index fa8828f61..1d14f8c6f 100644
--- a/accounts/abi/bind/backends/simulated.go
+++ b/accounts/abi/bind/backends/simulated.go
@@ -65,9 +65,9 @@ type SimulatedBackend struct {
// NewSimulatedBackend creates a new binding backend using a simulated blockchain
// for testing purposes.
-func NewSimulatedBackend(alloc core.GenesisAlloc) *SimulatedBackend {
+func NewSimulatedBackend(alloc core.GenesisAlloc, gasLimit uint64) *SimulatedBackend {
database := ethdb.NewMemDatabase()
- genesis := core.Genesis{Config: params.AllEthashProtocolChanges, Alloc: alloc}
+ genesis := core.Genesis{Config: params.AllEthashProtocolChanges, GasLimit: gasLimit, Alloc: alloc}
genesis.MustCommit(database)
blockchain, _ := core.NewBlockChain(database, nil, genesis.Config, ethash.NewFaker(), vm.Config{})