diff options
author | jm <jm.huang@cobinhood.com> | 2019-01-15 00:48:13 +0800 |
---|---|---|
committer | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-05-06 10:44:03 +0800 |
commit | 266068a53cdf9e06acacf982d63653c03133a634 (patch) | |
tree | af2d74e6adb309adfe39bafaa2f540fe0bcd1a31 /cmd | |
parent | d41cb421d755b8f0bca87b7476f26aa4b879b9d9 (diff) | |
download | dexon-266068a53cdf9e06acacf982d63653c03133a634.tar dexon-266068a53cdf9e06acacf982d63653c03133a634.tar.gz dexon-266068a53cdf9e06acacf982d63653c03133a634.tar.bz2 dexon-266068a53cdf9e06acacf982d63653c03133a634.tar.lz dexon-266068a53cdf9e06acacf982d63653c03133a634.tar.xz dexon-266068a53cdf9e06acacf982d63653c03133a634.tar.zst dexon-266068a53cdf9e06acacf982d63653c03133a634.zip |
core: vm: refactor file structure
For support other vm types, this pr modified the core/vm file
structures.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/evm/runner.go | 4 | ||||
-rw-r--r-- | cmd/evm/staterunner.go | 2 | ||||
-rw-r--r-- | cmd/govtool/main.go | 8 | ||||
-rw-r--r-- | cmd/utils/flags.go | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go index 114b9fd60..48782b496 100644 --- a/cmd/evm/runner.go +++ b/cmd/evm/runner.go @@ -32,8 +32,8 @@ import ( "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/core" "github.com/dexon-foundation/dexon/core/state" - "github.com/dexon-foundation/dexon/core/vm" - "github.com/dexon-foundation/dexon/core/vm/runtime" + vm "github.com/dexon-foundation/dexon/core/vm/evm" + "github.com/dexon-foundation/dexon/core/vm/evm/runtime" "github.com/dexon-foundation/dexon/ethdb" "github.com/dexon-foundation/dexon/log" "github.com/dexon-foundation/dexon/params" diff --git a/cmd/evm/staterunner.go b/cmd/evm/staterunner.go index b76dc3ca4..ee96a539c 100644 --- a/cmd/evm/staterunner.go +++ b/cmd/evm/staterunner.go @@ -24,7 +24,7 @@ import ( "os" "github.com/dexon-foundation/dexon/core/state" - "github.com/dexon-foundation/dexon/core/vm" + vm "github.com/dexon-foundation/dexon/core/vm/evm" "github.com/dexon-foundation/dexon/log" "github.com/dexon-foundation/dexon/tests" diff --git a/cmd/govtool/main.go b/cmd/govtool/main.go index 1425b9faf..3bd5897a2 100644 --- a/cmd/govtool/main.go +++ b/cmd/govtool/main.go @@ -9,7 +9,7 @@ import ( coreTypes "github.com/dexon-foundation/dexon-consensus/core/types" dkgTypes "github.com/dexon-foundation/dexon-consensus/core/types/dkg" "github.com/dexon-foundation/dexon/cmd/utils" - "github.com/dexon-foundation/dexon/core/vm" + "github.com/dexon-foundation/dexon/core/vm/evm" "github.com/dexon-foundation/dexon/rlp" "gopkg.in/urfave/cli.v1" ) @@ -42,7 +42,7 @@ func decodeInput(ctx *cli.Context) error { } // Parse input. - method, exists := vm.GovernanceABI.Sig2Method[string(input[:4])] + method, exists := evm.GovernanceABI.Sig2Method[string(input[:4])] if !exists { utils.Fatalf("invalid method") } @@ -110,7 +110,7 @@ func decodeInput(ctx *cli.Context) error { utils.Fatalf("%s", err) } switch args.Type.Uint64() { - case vm.FineTypeForkVote: + case evm.FineTypeForkVote: vote1 := new(coreTypes.Vote) if err := rlp.DecodeBytes(args.Arg1, vote1); err != nil { utils.Fatalf("%s", err) @@ -121,7 +121,7 @@ func decodeInput(ctx *cli.Context) error { } fmt.Printf("Vote1: %+v\n", vote1) fmt.Printf("Vote2: %+v\n", vote2) - case vm.FineTypeForkBlock: + case evm.FineTypeForkBlock: block1 := new(coreTypes.Block) if err := rlp.DecodeBytes(args.Arg1, block1); err != nil { utils.Fatalf("%s", err) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 6ac26d1fe..03540a33c 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -37,7 +37,7 @@ import ( "github.com/dexon-foundation/dexon/consensus/ethash" "github.com/dexon-foundation/dexon/core" "github.com/dexon-foundation/dexon/core/state" - "github.com/dexon-foundation/dexon/core/vm" + vm "github.com/dexon-foundation/dexon/core/vm/evm" "github.com/dexon-foundation/dexon/crypto" "github.com/dexon-foundation/dexon/dashboard" "github.com/dexon-foundation/dexon/dex" |