diff options
author | Determinant <[email protected]> | 2019-09-24 12:55:57 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-09-24 12:55:57 -0400 |
commit | fc9229d7d25dafe2eb37965115888d17e473ebe4 (patch) | |
tree | 251fde169b5f35dbbf27e720b98393e3a8165634 /coreth.go | |
parent | 215fec775fc457fb69d77fd0fc128893721fa34e (diff) |
enable AccountManager; add a channel to notify new txs
Diffstat (limited to 'coreth.go')
-rw-r--r-- | coreth.go | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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 = ð.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 |