aboutsummaryrefslogtreecommitdiffstats
path: root/les/helper_test.go
diff options
context:
space:
mode:
authorJM <jm@dexon.org>2019-01-31 15:12:57 +0800
committerJhih-Ming Huang <jm.huang@cobinhood.com>2019-05-06 10:44:03 +0800
commit9b8cd76237318e173147a7c32763b6b9d9759951 (patch)
tree44f860e1ed7e63354f48096ee5df0fa475719cc9 /les/helper_test.go
parentd3b485a5af768db59bd648175849f961e25bc630 (diff)
downloaddexon-9b8cd76237318e173147a7c32763b6b9d9759951.tar.gz
dexon-9b8cd76237318e173147a7c32763b6b9d9759951.tar.zst
dexon-9b8cd76237318e173147a7c32763b6b9d9759951.zip
core: vm: vm interface (#164)
Diffstat (limited to 'les/helper_test.go')
-rw-r--r--les/helper_test.go11
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)