diff options
author | Determinant <[email protected]> | 2019-09-26 22:19:04 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-09-26 22:19:04 -0400 |
commit | f3f0b274f2b8aad466b51448f2fbd2d2b8a4d1db (patch) | |
tree | 8b758b3c0d89cadcf9021acf0db206ab215d2663 /coreth.go | |
parent | a96fc7a942fb6f0a9da5b5bf9c84a98af42a24dc (diff) |
expose the database interface
Diffstat (limited to 'coreth.go')
-rw-r--r-- | coreth.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -14,6 +14,7 @@ import ( "github.com/ava-labs/go-ethereum/core/state" "github.com/ava-labs/go-ethereum/core/types" "github.com/ava-labs/go-ethereum/crypto" + "github.com/ava-labs/go-ethereum/ethdb" "github.com/ava-labs/go-ethereum/event" "github.com/ava-labs/go-ethereum/log" "github.com/ava-labs/go-ethereum/rpc" @@ -34,7 +35,7 @@ func isLocalBlock(block *types.Block) bool { return false } -func NewETHChain(config *eth.Config, nodecfg *node.Config, etherBase *common.Address) *ETHChain { +func NewETHChain(config *eth.Config, nodecfg *node.Config, etherBase *common.Address, chainDB ethdb.Database) *ETHChain { if config == nil { config = ð.DefaultConfig } @@ -47,11 +48,11 @@ func NewETHChain(config *eth.Config, nodecfg *node.Config, etherBase *common.Add panic(err) } if ep != "" { - log.Info(fmt.Sprintf("ephemeral = %s", ep)) + log.Info(fmt.Sprintf("temporary keystore = %s", ep)) } cb := new(dummy.ConsensusCallbacks) mcb := new(miner.MinerCallbacks) - backend, _ := eth.New(&ctx, config, cb, mcb) + backend, _ := eth.New(&ctx, config, cb, mcb, chainDB) chain := ÐChain{backend: backend, cb: cb, mcb: mcb} if etherBase == nil { etherBase = &common.Address{ |