aboutsummaryrefslogtreecommitdiff
path: root/coreth.go
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2019-09-24 12:55:57 -0400
committerDeterminant <tederminant@gmail.com>2019-09-24 12:55:57 -0400
commitfc9229d7d25dafe2eb37965115888d17e473ebe4 (patch)
tree251fde169b5f35dbbf27e720b98393e3a8165634 /coreth.go
parent215fec775fc457fb69d77fd0fc128893721fa34e (diff)
enable AccountManager; add a channel to notify new txs
Diffstat (limited to 'coreth.go')
-rw-r--r--coreth.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/coreth.go b/coreth.go
index 0dbb226..3046b97 100644
--- a/coreth.go
+++ b/coreth.go
@@ -2,6 +2,7 @@ package coreth
import (
"crypto/ecdsa"
+ "fmt"
"io"
"os"
@@ -38,7 +39,13 @@ func NewETHChain(config *eth.Config, etherBase *common.Address) *ETHChain {
config = &eth.DefaultConfig
}
mux := new(event.TypeMux)
- ctx := node.NewServiceContext(mux)
+ ctx, ep, err := node.NewServiceContext(nil, mux)
+ if err != nil {
+ panic(err)
+ }
+ if ep != "" {
+ log.Info(fmt.Sprintf("ephemeral = %s", ep))
+ }
cb := new(dummy.ConsensusCallbacks)
mcb := new(miner.MinerCallbacks)
backend, _ := eth.New(&ctx, config, cb, mcb)
@@ -151,6 +158,10 @@ func (self *ETHChain) AttachEthService(handler *rpc.Server, namespaces []string)
}
}
+func (self *ETHChain) GetTxSubmitCh() <-chan struct{} {
+ return self.backend.GetTxSubmitCh()
+}
+
type Key struct {
Address common.Address
PrivateKey *ecdsa.PrivateKey