aboutsummaryrefslogtreecommitdiff
path: root/coreth.go
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2019-09-26 22:19:04 -0400
committerDeterminant <tederminant@gmail.com>2019-09-26 22:19:04 -0400
commitf3f0b274f2b8aad466b51448f2fbd2d2b8a4d1db (patch)
tree8b758b3c0d89cadcf9021acf0db206ab215d2663 /coreth.go
parenta96fc7a942fb6f0a9da5b5bf9c84a98af42a24dc (diff)
expose the database interface
Diffstat (limited to 'coreth.go')
-rw-r--r--coreth.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/coreth.go b/coreth.go
index 4bb0ae8..04d782f 100644
--- a/coreth.go
+++ b/coreth.go
@@ -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 = &eth.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 := &ETHChain{backend: backend, cb: cb, mcb: mcb}
if etherBase == nil {
etherBase = &common.Address{