aboutsummaryrefslogtreecommitdiffstats
path: root/ethwire
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-10 17:22:19 +0800
committerobscuren <geffobscura@gmail.com>2014-09-10 17:22:19 +0800
commit2f362509b813573f533a5be437c140355ddec7fc (patch)
tree8d31b76be7746400eac5ae935eb7d5d21c3360cb /ethwire
parent29499900160cc2ee88968b74035f0a5c2d4c5af6 (diff)
downloaddexon-2f362509b813573f533a5be437c140355ddec7fc.tar.gz
dexon-2f362509b813573f533a5be437c140355ddec7fc.tar.zst
dexon-2f362509b813573f533a5be437c140355ddec7fc.zip
New p2p protocol. NOTE: Needs major refactoring. See #50
Diffstat (limited to 'ethwire')
-rw-r--r--ethwire/messaging.go32
1 files changed, 13 insertions, 19 deletions
diff --git a/ethwire/messaging.go b/ethwire/messaging.go
index 7ac0188a1..c93c717a2 100644
--- a/ethwire/messaging.go
+++ b/ethwire/messaging.go
@@ -27,24 +27,20 @@ const (
// Values are given explicitly instead of by iota because these values are
// defined by the wire protocol spec; it is easier for humans to ensure
// correctness when values are explicit.
- MsgHandshakeTy = 0x00
- MsgDiscTy = 0x01
- MsgPingTy = 0x02
- MsgPongTy = 0x03
- MsgGetPeersTy = 0x10
- MsgPeersTy = 0x11
+ MsgHandshakeTy = 0x00
+ MsgDiscTy = 0x01
+ MsgPingTy = 0x02
+ MsgPongTy = 0x03
+ MsgGetPeersTy = 0x04
+ MsgPeersTy = 0x05
+
+ MsgStatusTy = 0x10
+ MsgGetTxsTy = 0x11
MsgTxTy = 0x12
- MsgGetChainTy = 0x14
- MsgNotInChainTy = 0x15
- MsgGetTxsTy = 0x16
- MsgGetBlockHashesTy = 0x17
- MsgBlockHashesTy = 0x18
- MsgGetBlocksTy = 0x19
- MsgBlockTy = 0x13
-
- MsgOldBlockTy = 0xbb
-
- MsgTalkTy = 0xff
+ MsgGetBlockHashesTy = 0x13
+ MsgBlockHashesTy = 0x14
+ MsgGetBlocksTy = 0x15
+ MsgBlockTy = 0x16
)
var msgTypeToString = map[MsgType]string{
@@ -56,9 +52,7 @@ var msgTypeToString = map[MsgType]string{
MsgPeersTy: "Peers",
MsgTxTy: "Transactions",
MsgBlockTy: "Blocks",
- MsgGetChainTy: "Get chain",
MsgGetTxsTy: "Get Txs",
- MsgNotInChainTy: "Not in chain",
MsgGetBlockHashesTy: "Get block hashes",
MsgBlockHashesTy: "Block hashes",
MsgGetBlocksTy: "Get blocks",