aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/xeth.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-09 20:49:14 +0800
committerobscuren <geffobscura@gmail.com>2015-03-09 20:49:14 +0800
commit738d6e20f2a229aab15b767cb8ca2d2f9c2f9aa8 (patch)
treec7bb201102d2a678e95289cfe5130ea41c15b204 /xeth/xeth.go
parent21fd722abc37d60d3f54b54efefab3db71309b57 (diff)
downloadgo-tangerine-738d6e20f2a229aab15b767cb8ca2d2f9c2f9aa8.tar
go-tangerine-738d6e20f2a229aab15b767cb8ca2d2f9c2f9aa8.tar.gz
go-tangerine-738d6e20f2a229aab15b767cb8ca2d2f9c2f9aa8.tar.bz2
go-tangerine-738d6e20f2a229aab15b767cb8ca2d2f9c2f9aa8.tar.lz
go-tangerine-738d6e20f2a229aab15b767cb8ca2d2f9c2f9aa8.tar.xz
go-tangerine-738d6e20f2a229aab15b767cb8ca2d2f9c2f9aa8.tar.zst
go-tangerine-738d6e20f2a229aab15b767cb8ca2d2f9c2f9aa8.zip
Added ui.Interface to xeth
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r--xeth/xeth.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 6ee581e4e..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"
)
@@ -46,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(),
@@ -56,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