aboutsummaryrefslogtreecommitdiffstats
path: root/xeth
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-25 00:45:31 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-25 00:45:31 +0800
commit865f31018b7c4151a412cdc2466a912fb5869037 (patch)
tree5bb67c0a8c337a53e525c4a8220a935e95f37448 /xeth
parent2106a63d60e261608dc71a30f07b6b905fc78f2f (diff)
downloadgo-tangerine-865f31018b7c4151a412cdc2466a912fb5869037.tar.gz
go-tangerine-865f31018b7c4151a412cdc2466a912fb5869037.tar.zst
go-tangerine-865f31018b7c4151a412cdc2466a912fb5869037.zip
Shuffle
Diffstat (limited to 'xeth')
-rw-r--r--xeth/xeth.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 565e96412..4bab92904 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -29,12 +29,12 @@ var (
)
type XEth struct {
- backend *eth.Ethereum
+ backend *eth.Ethereum
+ frontend Frontend
+
state *State
whisper *Whisper
- frontend Frontend
-
quit chan struct{}
filterManager *filter.FilterManager
@@ -47,7 +47,6 @@ type XEth struct {
// regmut sync.Mutex
// register map[string][]*interface{} // TODO improve return type
- // Miner agent
agent *miner.RemoteAgent
}
@@ -57,10 +56,10 @@ type XEth struct {
func New(eth *eth.Ethereum, frontend Frontend) *XEth {
xeth := &XEth{
backend: eth,
+ frontend: frontend,
whisper: NewWhisper(eth.Whisper()),
quit: make(chan struct{}),
filterManager: filter.NewFilterManager(eth.EventMux()),
- frontend: frontend,
logs: make(map[int]*logFilter),
messages: make(map[int]*whisperFilter),
agent: miner.NewRemoteAgent(),
@@ -71,6 +70,7 @@ func New(eth *eth.Ethereum, frontend Frontend) *XEth {
xeth.frontend = dummyFrontend{}
}
xeth.state = NewState(xeth, xeth.backend.ChainManager().TransState())
+
go xeth.start()
go xeth.filterManager.Start()
@@ -144,6 +144,7 @@ func (self *XEth) WithState(statedb *state.StateDB) *XEth {
xeth.state = NewState(xeth, statedb)
return xeth
}
+
func (self *XEth) State() *State { return self.state }
func (self *XEth) Whisper() *Whisper { return self.whisper }