aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-21 19:25:31 +0800
committerobscuren <geffobscura@gmail.com>2014-10-21 19:25:31 +0800
commit520fdfe346ab51708f4f1fdfd0b2e42cc919e613 (patch)
tree51e9bef882bee329c18c85102fb98350d5880b0e /peer.go
parent10b252dd0517175117d8d4a8ef30b3689a10eda5 (diff)
downloadgo-tangerine-520fdfe346ab51708f4f1fdfd0b2e42cc919e613.tar
go-tangerine-520fdfe346ab51708f4f1fdfd0b2e42cc919e613.tar.gz
go-tangerine-520fdfe346ab51708f4f1fdfd0b2e42cc919e613.tar.bz2
go-tangerine-520fdfe346ab51708f4f1fdfd0b2e42cc919e613.tar.lz
go-tangerine-520fdfe346ab51708f4f1fdfd0b2e42cc919e613.tar.xz
go-tangerine-520fdfe346ab51708f4f1fdfd0b2e42cc919e613.tar.zst
go-tangerine-520fdfe346ab51708f4f1fdfd0b2e42cc919e613.zip
PoC7 Net
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go32
1 files changed, 17 insertions, 15 deletions
diff --git a/peer.go b/peer.go
index 0eb2eb299..c5e7b82b5 100644
--- a/peer.go
+++ b/peer.go
@@ -322,7 +322,7 @@ out:
case msg := <-p.outputQueue:
if !p.statusKnown {
switch msg.Type {
- case ethwire.MsgGetTxsTy, ethwire.MsgTxTy, ethwire.MsgGetBlockHashesTy, ethwire.MsgBlockHashesTy, ethwire.MsgGetBlocksTy, ethwire.MsgBlockTy:
+ case ethwire.MsgTxTy, ethwire.MsgGetBlockHashesTy, ethwire.MsgBlockHashesTy, ethwire.MsgGetBlocksTy, ethwire.MsgBlockTy:
break skip
}
}
@@ -457,16 +457,18 @@ func (p *Peer) HandleInbound() {
// TMP
if p.statusKnown {
switch msg.Type {
- case ethwire.MsgGetTxsTy:
- // Get the current transactions of the pool
- txs := p.ethereum.TxPool().CurrentTransactions()
- // Get the RlpData values from the txs
- txsInterface := make([]interface{}, len(txs))
- for i, tx := range txs {
- txsInterface[i] = tx.RlpData()
- }
- // Broadcast it back to the peer
- p.QueueMessage(ethwire.NewMessage(ethwire.MsgTxTy, txsInterface))
+ /*
+ case ethwire.MsgGetTxsTy:
+ // Get the current transactions of the pool
+ txs := p.ethereum.TxPool().CurrentTransactions()
+ // Get the RlpData values from the txs
+ txsInterface := make([]interface{}, len(txs))
+ for i, tx := range txs {
+ txsInterface[i] = tx.RlpData()
+ }
+ // Broadcast it back to the peer
+ p.QueueMessage(ethwire.NewMessage(ethwire.MsgTxTy, txsInterface))
+ */
case ethwire.MsgGetBlockHashesTy:
if msg.Data.Len() < 2 {
@@ -687,10 +689,10 @@ func (self *Peer) handleStatus(msg *ethwire.Msg) {
var (
//protoVersion = c.Get(0).Uint()
- netVersion = c.Get(0).Uint()
- td = c.Get(1).BigInt()
- bestHash = c.Get(2).Bytes()
- genesis = c.Get(3).Bytes()
+ netVersion = c.Get(1).Uint()
+ td = c.Get(2).BigInt()
+ bestHash = c.Get(3).Bytes()
+ genesis = c.Get(4).Bytes()
)
if bytes.Compare(self.ethereum.ChainManager().Genesis().Hash(), genesis) != 0 {