aboutsummaryrefslogtreecommitdiff
path: root/coreth.go
diff options
context:
space:
mode:
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