diff options
author | obscuren <geffobscura@gmail.com> | 2014-01-24 05:32:50 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-01-24 05:32:50 +0800 |
commit | 233f5200ef77ee77b4d33b5ff277d0e524b1fb4d (patch) | |
tree | 04ef6bfad717acdd7b8db987ae8fc37cf3e7d041 /peer.go | |
parent | 878e796c0adaa608a3e5feacf89a6766b347c9c8 (diff) | |
download | go-tangerine-233f5200ef77ee77b4d33b5ff277d0e524b1fb4d.tar go-tangerine-233f5200ef77ee77b4d33b5ff277d0e524b1fb4d.tar.gz go-tangerine-233f5200ef77ee77b4d33b5ff277d0e524b1fb4d.tar.bz2 go-tangerine-233f5200ef77ee77b4d33b5ff277d0e524b1fb4d.tar.lz go-tangerine-233f5200ef77ee77b4d33b5ff277d0e524b1fb4d.tar.xz go-tangerine-233f5200ef77ee77b4d33b5ff277d0e524b1fb4d.tar.zst go-tangerine-233f5200ef77ee77b4d33b5ff277d0e524b1fb4d.zip |
Data send over the wire shouldn't be RLPed more then once
Diffstat (limited to 'peer.go')
-rw-r--r-- | peer.go | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -170,12 +170,15 @@ out: // Version message p.handleHandshake(msg) case ethwire.MsgBlockTy: - err := p.ethereum.BlockManager.ProcessBlock(ethchain.NewBlock(msg.Data)) - if err != nil { - log.Println(err) - } + /* + err := p.ethereum.BlockManager.ProcessBlock(ethchain.NewBlock(msg.Data)) + if err != nil { + log.Println(err) + } + */ case ethwire.MsgTxTy: - p.ethereum.TxPool.QueueTransaction(ethutil.NewTransactionFromData(msg.Data)) + //p.ethereum.TxPool.QueueTransaction(ethchain.NewTransactionFromData(msg.Data)) + p.ethereum.TxPool.QueueTransaction(ethchain.NewTransactionFromRlpValue(msg.Data.Get(0))) case ethwire.MsgInvTy: case ethwire.MsgGetPeersTy: p.requestedPeerList = true @@ -263,7 +266,7 @@ func (p *Peer) pushPeers() { } func (p *Peer) handleHandshake(msg *ethwire.Msg) { - c := ethutil.Conv(msg.Data) + c := msg.Data // [PROTOCOL_VERSION, NETWORK_ID, CLIENT_ID] if c.Get(2).AsUint() == p.ethereum.Nonce { //if msg.Nonce == p.ethereum.Nonce { |