diff options
author | JM <jm@dexon.org> | 2019-01-31 15:12:57 +0800 |
---|---|---|
committer | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-03-26 17:48:21 +0800 |
commit | 1ea57eed7e9e37b40d27b11fe316cfe3569fade6 (patch) | |
tree | 9f5b919f6c75e6dd713902ecc96a0c845679649a /les | |
parent | 1810c3af03d3da56d42f93c4521e33332156dcb6 (diff) | |
download | dexon-1ea57eed7e9e37b40d27b11fe316cfe3569fade6.tar dexon-1ea57eed7e9e37b40d27b11fe316cfe3569fade6.tar.gz dexon-1ea57eed7e9e37b40d27b11fe316cfe3569fade6.tar.bz2 dexon-1ea57eed7e9e37b40d27b11fe316cfe3569fade6.tar.lz dexon-1ea57eed7e9e37b40d27b11fe316cfe3569fade6.tar.xz dexon-1ea57eed7e9e37b40d27b11fe316cfe3569fade6.tar.zst dexon-1ea57eed7e9e37b40d27b11fe316cfe3569fade6.zip |
core: vm: vm interface (#164)
Diffstat (limited to 'les')
-rw-r--r-- | les/helper_test.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/les/helper_test.go b/les/helper_test.go index 550fb1905..136c4e33e 100644 --- a/les/helper_test.go +++ b/les/helper_test.go @@ -30,7 +30,8 @@ import ( "github.com/dexon-foundation/dexon/consensus/ethash" "github.com/dexon-foundation/dexon/core" "github.com/dexon-foundation/dexon/core/types" - vm "github.com/dexon-foundation/dexon/core/vm/evm" + "github.com/dexon-foundation/dexon/core/vm/evm" + "github.com/dexon-foundation/dexon/core/vm/tools" "github.com/dexon-foundation/dexon/crypto" "github.com/dexon-foundation/dexon/eth" "github.com/dexon-foundation/dexon/ethdb" @@ -77,7 +78,11 @@ contract test { } } */ - +func init() { + testContractCode = tools.PatchBinary(testContractCode) + testEventEmitterCode = tools.PatchBinary(testEventEmitterCode) + testContractCodeDeployed = tools.PatchBinary(testContractCodeDeployed) +} func testChainGen(i int, block *core.BlockGen) { signer := types.HomesteadSigner{} @@ -164,7 +169,7 @@ func newTestProtocolManager(lightSync bool, blocks int, generator func(int, *cor if lightSync { chain, _ = light.NewLightChain(odr, gspec.Config, engine) } else { - blockchain, _ := core.NewBlockChain(db, nil, gspec.Config, engine, vm.Config{}, nil) + blockchain, _ := core.NewBlockChain(db, nil, gspec.Config, engine, evm.Config{}, nil) gchain, _ := core.GenerateChain(gspec.Config, genesis, ethash.NewFaker(), db, blocks, generator) if _, err := blockchain.InsertChain(gchain); err != nil { panic(err) |