diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-11-15 20:46:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-15 20:46:47 +0800 |
commit | 81d9d7d38555a63602b9da3d07955ad4e5a62f02 (patch) | |
tree | 9ce0d55bfe182f6493867ea5497bf2c8cd9e8523 /accounts/abi | |
parent | ef9265d0d7abf6614c1d2fb977989ab0d400a590 (diff) | |
parent | 822355f8a6e8826561433392fd94a8bde7e4dbf3 (diff) | |
download | go-tangerine-1.4.19.tar go-tangerine-1.4.19.tar.gz go-tangerine-1.4.19.tar.bz2 go-tangerine-1.4.19.tar.lz go-tangerine-1.4.19.tar.xz go-tangerine-1.4.19.tar.zst go-tangerine-1.4.19.zip |
Merge pull request #3252 from obscuren/release/1.4v1.4.19
1.4 HF
Diffstat (limited to 'accounts/abi')
-rw-r--r-- | accounts/abi/bind/backends/simulated.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index 2f4d39410..f078071c0 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -27,10 +27,11 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/params" ) // Default chain configuration which sets homestead phase at block 0 (i.e. no frontier) -var chainConfig = &core.ChainConfig{HomesteadBlock: big.NewInt(0)} +var chainConfig = ¶ms.ChainConfig{ChainId: new(big.Int), HomesteadBlock: big.NewInt(0), EIP150Block: new(big.Int), EIP158Block: new(big.Int)} // This nil assignment ensures compile time that SimulatedBackend implements bind.ContractBackend. var _ bind.ContractBackend = (*SimulatedBackend)(nil) @@ -72,8 +73,7 @@ func (b *SimulatedBackend) Commit() { // Rollback aborts all pending transactions, reverting to the last committed state. func (b *SimulatedBackend) Rollback() { - blocks, _ := core.GenerateChain(nil, b.blockchain.CurrentBlock(), b.database, 1, func(int, *core.BlockGen) {}) - + blocks, _ := core.GenerateChain(chainConfig, b.blockchain.CurrentBlock(), b.database, 1, func(int, *core.BlockGen) {}) b.pendingBlock = blocks[0] b.pendingState, _ = state.New(b.pendingBlock.Root(), b.database) } @@ -182,7 +182,7 @@ func (b *SimulatedBackend) EstimateGasLimit(sender common.Address, contract *com // SendTransaction implements ContractTransactor.SendTransaction, delegating the raw // transaction injection to the remote node. func (b *SimulatedBackend) SendTransaction(tx *types.Transaction) error { - blocks, _ := core.GenerateChain(nil, b.blockchain.CurrentBlock(), b.database, 1, func(number int, block *core.BlockGen) { + blocks, _ := core.GenerateChain(chainConfig, b.blockchain.CurrentBlock(), b.database, 1, func(number int, block *core.BlockGen) { for _, tx := range b.pendingBlock.Transactions() { block.AddTx(tx) } |