diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-14 00:00:15 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-14 00:00:15 +0800 |
commit | 8305d409d2ca83583d9fa7e837ec0a46ce6ba78e (patch) | |
tree | 956c768957f56044113772a88a9cbe7de0ef9cf1 /xeth | |
parent | b64ad7a2a6544564b68f362f18c70476310396d6 (diff) | |
parent | 5c251b69282b3992512d0c17ed0063f294a0e663 (diff) | |
download | go-tangerine-8305d409d2ca83583d9fa7e837ec0a46ce6ba78e.tar go-tangerine-8305d409d2ca83583d9fa7e837ec0a46ce6ba78e.tar.gz go-tangerine-8305d409d2ca83583d9fa7e837ec0a46ce6ba78e.tar.bz2 go-tangerine-8305d409d2ca83583d9fa7e837ec0a46ce6ba78e.tar.lz go-tangerine-8305d409d2ca83583d9fa7e837ec0a46ce6ba78e.tar.xz go-tangerine-8305d409d2ca83583d9fa7e837ec0a46ce6ba78e.tar.zst go-tangerine-8305d409d2ca83583d9fa7e837ec0a46ce6ba78e.zip |
Merge branch 'develop' into miner
Diffstat (limited to 'xeth')
-rw-r--r-- | xeth/types.go | 32 | ||||
-rw-r--r-- | xeth/xeth.go | 10 |
2 files changed, 1 insertions, 41 deletions
diff --git a/xeth/types.go b/xeth/types.go index f1d6f0789..a903fccbb 100644 --- a/xeth/types.go +++ b/xeth/types.go @@ -214,7 +214,7 @@ func NewPeer(peer *p2p.Peer) *Peer { return &Peer{ ref: peer, Ip: fmt.Sprintf("%v", peer.RemoteAddr()), - Version: fmt.Sprintf("%v", peer.Identity()), + Version: fmt.Sprintf("%v", peer.ID()), Caps: fmt.Sprintf("%v", caps), } } @@ -234,33 +234,3 @@ func NewReciept(contractCreation bool, creationAddress, hash, address []byte) *R toHex(address), } } - -type Message struct { - To string `json:"to"` - From string `json:"from"` - Input string `json:"input"` - Output string `json:"output"` - Path int32 `json:"path"` - Origin string `json:"origin"` - Timestamp int32 `json:"timestamp"` - Coinbase string `json:"coinbase"` - Block string `json:"block"` - Number int32 `json:"number"` - Value string `json:"value"` -} - -func NewMessage(message *state.Message) Message { - return Message{ - To: toHex(message.To), - From: toHex(message.From), - Input: toHex(message.Input), - Output: toHex(message.Output), - Path: int32(message.Path), - Origin: toHex(message.Origin), - Timestamp: int32(message.Timestamp), - Coinbase: toHex(message.Origin), - Block: toHex(message.Block), - Number: int32(message.Number.Int64()), - Value: message.Value.String(), - } -} diff --git a/xeth/xeth.go b/xeth/xeth.go index 0e71a0ed9..75d83f80b 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -31,7 +31,6 @@ type Backend interface { IsListening() bool Peers() []*p2p.Peer KeyManager() *crypto.KeyManager - ClientIdentity() p2p.ClientIdentity Db() ethutil.Database EventMux() *event.TypeMux Whisper() *whisper.Whisper @@ -192,15 +191,6 @@ func (self *XEth) FromNumber(str string) string { return ethutil.BigD(fromHex(str)).String() } -func ToMessages(messages state.Messages) *ethutil.List { - var msgs []Message - for _, m := range messages { - msgs = append(msgs, NewMessage(m)) - } - - return ethutil.NewList(msgs) -} - func (self *XEth) PushTx(encodedTx string) (string, error) { tx := types.NewTransactionFromBytes(fromHex(encodedTx)) err := self.eth.TxPool().Add(tx) |