aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/evm
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2019-03-07 16:21:40 +0800
committerGitHub <noreply@github.com>2019-03-07 16:21:40 +0800
commit72b21db2d31d77d956c09353457a0c2db45249b0 (patch)
treec0c750bfbbc5b5d8e9622847b676c1f4d99f4020 /cmd/evm
parentf2d63103541ee3746ff0834e7c69d188af3572d2 (diff)
parent054412e33528e53f6deae940c870217b614707b9 (diff)
downloadgo-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar.gz
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar.bz2
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar.lz
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar.xz
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar.zst
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.zip
Merge pull request #19021 from karalabe/database-cleanup
all: clean up and properly abstract database accesses
Diffstat (limited to 'cmd/evm')
-rw-r--r--cmd/evm/runner.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go
index c732c8b57..bc5d00cfb 100644
--- a/cmd/evm/runner.go
+++ b/cmd/evm/runner.go
@@ -31,10 +31,10 @@ import (
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
+ "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/core/vm/runtime"
- "github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
cli "gopkg.in/urfave/cli.v1"
@@ -99,12 +99,12 @@ func runCmd(ctx *cli.Context) error {
if ctx.GlobalString(GenesisFlag.Name) != "" {
gen := readGenesis(ctx.GlobalString(GenesisFlag.Name))
genesisConfig = gen
- db := ethdb.NewMemDatabase()
+ db := rawdb.NewMemoryDatabase()
genesis := gen.ToBlock(db)
statedb, _ = state.New(genesis.Root(), state.NewDatabase(db))
chainConfig = gen.Config
} else {
- statedb, _ = state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ = state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()))
genesisConfig = new(core.Genesis)
}
if ctx.GlobalString(SenderFlag.Name) != "" {