From 9b8cd76237318e173147a7c32763b6b9d9759951 Mon Sep 17 00:00:00 2001 From: JM Date: Thu, 31 Jan 2019 15:12:57 +0800 Subject: core: vm: vm interface (#164) --- les/helper_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'les/helper_test.go') 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) -- cgit