aboutsummaryrefslogtreecommitdiffstats
path: root/xeth
diff options
context:
space:
mode:
Diffstat (limited to 'xeth')
-rw-r--r--xeth/xeth.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 70172a1c8..4c28caf86 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -32,6 +32,7 @@ type Backend interface {
Peers() []*p2p.Peer
BlockDb() ethutil.Database
StateDb() ethutil.Database
+ ExtraDb() ethutil.Database
EventMux() *event.TypeMux
Whisper() *whisper.Whisper
@@ -127,6 +128,14 @@ func (self *XEth) EthBlockByHash(strHash string) *types.Block {
return block
}
+func (self *XEth) EthTransactionByHash(hash string) *types.Transaction {
+ data, _ := self.eth.ExtraDb().Get(fromHex(hash))
+ if len(data) != 0 {
+ return types.NewTransactionFromBytes(data)
+ }
+ return nil
+}
+
func (self *XEth) BlockByNumber(num int64) *Block {
if num == -1 {
return NewBlock(self.chainManager.CurrentBlock())
@@ -231,10 +240,6 @@ func (self *XEth) SecretToAddress(key string) string {
return toHex(pair.Address())
}
-func (self *XEth) Execute(addr, value, gas, price, data string) (string, error) {
- return "", nil
-}
-
type KeyVal struct {
Key string `json:"key"`
Value string `json:"value"`