aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/xeth.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-10 08:22:38 +0800
committerobscuren <geffobscura@gmail.com>2015-03-10 08:22:38 +0800
commit0db4a0e898d09ffa7b6b1289e9a334edc0001cfa (patch)
treea0b5c8381ab482550ef4800a06d4db086d76a983 /xeth/xeth.go
parent94e543bc398efbb5c712b6e4cb48d8a57eb3400d (diff)
parent0d64163fea3a266ceb71cb4c4ee5682052c9ca6c (diff)
downloaddexon-0db4a0e898d09ffa7b6b1289e9a334edc0001cfa.tar
dexon-0db4a0e898d09ffa7b6b1289e9a334edc0001cfa.tar.gz
dexon-0db4a0e898d09ffa7b6b1289e9a334edc0001cfa.tar.bz2
dexon-0db4a0e898d09ffa7b6b1289e9a334edc0001cfa.tar.lz
dexon-0db4a0e898d09ffa7b6b1289e9a334edc0001cfa.tar.xz
dexon-0db4a0e898d09ffa7b6b1289e9a334edc0001cfa.tar.zst
dexon-0db4a0e898d09ffa7b6b1289e9a334edc0001cfa.zip
Merge branch 'poc-9' into develop
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r--xeth/xeth.go18
1 files changed, 16 insertions, 2 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 677d40fd5..88ae253cd 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -18,6 +18,7 @@ import (
"github.com/ethereum/go-ethereum/miner"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/state"
+ "github.com/ethereum/go-ethereum/ui"
"github.com/ethereum/go-ethereum/whisper"
)
@@ -32,7 +33,8 @@ type Backend interface {
IsListening() bool
Peers() []*p2p.Peer
KeyManager() *crypto.KeyManager
- Db() ethutil.Database
+ BlockDb() ethutil.Database
+ StateDb() ethutil.Database
EventMux() *event.TypeMux
Whisper() *whisper.Whisper
Miner() *miner.Miner
@@ -45,9 +47,16 @@ type XEth struct {
state *State
whisper *Whisper
miner *miner.Miner
+
+ frontend ui.Interface
}
-func New(eth Backend) *XEth {
+type TmpFrontend struct{}
+
+func (TmpFrontend) UnlockAccount([]byte) bool { panic("UNLOCK ACCOUNT") }
+func (TmpFrontend) ConfirmTransaction(*types.Transaction) bool { panic("CONFIRM TRANSACTION") }
+
+func New(eth Backend, frontend ui.Interface) *XEth {
xeth := &XEth{
eth: eth,
blockProcessor: eth.BlockProcessor(),
@@ -55,6 +64,11 @@ func New(eth Backend) *XEth {
whisper: NewWhisper(eth.Whisper()),
miner: eth.Miner(),
}
+
+ if frontend == nil {
+ xeth.frontend = TmpFrontend{}
+ }
+
xeth.state = NewState(xeth, xeth.chainManager.TransState())
return xeth