From 3136bae4a5f08820d3116b61b783c100c169717c Mon Sep 17 00:00:00 2001 From: zsfelfoldi Date: Tue, 31 Mar 2015 08:28:12 +0200 Subject: NatSpec, URL register storage retrieval fixed 2/3 tests --- xeth/frontend.go | 10 +++------- xeth/xeth.go | 6 ++++++ 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'xeth') diff --git a/xeth/frontend.go b/xeth/frontend.go index 8deb5c98c..fe1d57c50 100644 --- a/xeth/frontend.go +++ b/xeth/frontend.go @@ -1,9 +1,5 @@ package xeth -import ( - "github.com/ethereum/go-ethereum/core/types" -) - // Frontend should be implemented by users of XEth. Its methods are // called whenever XEth makes a decision that requires user input. type Frontend interface { @@ -21,12 +17,12 @@ type Frontend interface { // // ConfirmTransaction is not used for Call transactions // because they cannot change any state. - ConfirmTransaction(tx *types.Transaction) bool + ConfirmTransaction(tx string) bool } // dummyFrontend is a non-interactive frontend that allows all // transactions but cannot not unlock any keys. type dummyFrontend struct{} -func (dummyFrontend) UnlockAccount([]byte) bool { return false } -func (dummyFrontend) ConfirmTransaction(*types.Transaction) bool { return true } +func (dummyFrontend) UnlockAccount([]byte) bool { return false } +func (dummyFrontend) ConfirmTransaction(string) bool { return true } diff --git a/xeth/xeth.go b/xeth/xeth.go index c1a2ec283..b8a170c5b 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -608,6 +608,12 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st return common.ToHex(res), err } +func (self *XEth) ConfirmTransaction(tx string) bool { + + return self.frontend.ConfirmTransaction(tx) + +} + func (self *XEth) Transact(fromStr, toStr, valueStr, gasStr, gasPriceStr, codeStr string) (string, error) { var ( from = common.HexToAddress(fromStr) -- cgit v1.2.3 From e2d333d2095edb349388433c28f4d6a381b1df62 Mon Sep 17 00:00:00 2001 From: zsfelfoldi Date: Fri, 3 Apr 2015 17:37:59 +0200 Subject: NatSpec contracts in genesis block, end to end test (unfinished) --- xeth/xeth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xeth') diff --git a/xeth/xeth.go b/xeth/xeth.go index b8a170c5b..afcb33e4c 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -148,10 +148,10 @@ func (self *XEth) AtStateNum(num int64) *XEth { } } - return self.withState(st) + return self.WithState(st) } -func (self *XEth) withState(statedb *state.StateDB) *XEth { +func (self *XEth) WithState(statedb *state.StateDB) *XEth { xeth := &XEth{ backend: self.backend, } -- cgit v1.2.3