diff options
author | Zsolt Felfoldi <zsfelfoldi@gmail.com> | 2019-04-05 23:01:51 +0800 |
---|---|---|
committer | Zsolt Felfoldi <zsfelfoldi@gmail.com> | 2019-04-08 19:17:24 +0800 |
commit | 5515f364ae1673c1bf5569c089b5853c90ea1655 (patch) | |
tree | c220d8e953d8f075cc39d4ceb0d01d658052bd4f /les/protocol.go | |
parent | 3996bc1ad91665ad30036713fba11840a36dfff0 (diff) | |
download | go-tangerine-5515f364ae1673c1bf5569c089b5853c90ea1655.tar go-tangerine-5515f364ae1673c1bf5569c089b5853c90ea1655.tar.gz go-tangerine-5515f364ae1673c1bf5569c089b5853c90ea1655.tar.bz2 go-tangerine-5515f364ae1673c1bf5569c089b5853c90ea1655.tar.lz go-tangerine-5515f364ae1673c1bf5569c089b5853c90ea1655.tar.xz go-tangerine-5515f364ae1673c1bf5569c089b5853c90ea1655.tar.zst go-tangerine-5515f364ae1673c1bf5569c089b5853c90ea1655.zip |
les: removed les/1 protocol messages
Diffstat (limited to 'les/protocol.go')
-rw-r--r-- | les/protocol.go | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/les/protocol.go b/les/protocol.go index 65395ac05..86e450d01 100644 --- a/les/protocol.go +++ b/les/protocol.go @@ -33,19 +33,18 @@ import ( // Constants to match up protocol versions and messages const ( - lpv1 = 1 lpv2 = 2 ) // Supported versions of the les protocol (first is primary) var ( - ClientProtocolVersions = []uint{lpv2, lpv1} - ServerProtocolVersions = []uint{lpv2, lpv1} + ClientProtocolVersions = []uint{lpv2} + ServerProtocolVersions = []uint{lpv2} AdvertiseProtocolVersions = []uint{lpv2} // clients are searching for the first advertised protocol in the list ) // Number of implemented message corresponding to different protocol versions. -var ProtocolLengths = map[uint]uint64{lpv1: 15, lpv2: 22} +var ProtocolLengths = map[uint]uint64{lpv2: 22} const ( NetworkId = 1 @@ -54,7 +53,7 @@ const ( // les protocol message codes const ( - // Protocol messages belonging to LPV1 + // Protocol messages inherited from LPV1 StatusMsg = 0x00 AnnounceMsg = 0x01 GetBlockHeadersMsg = 0x02 @@ -63,14 +62,9 @@ const ( BlockBodiesMsg = 0x05 GetReceiptsMsg = 0x06 ReceiptsMsg = 0x07 - GetProofsV1Msg = 0x08 - ProofsV1Msg = 0x09 GetCodeMsg = 0x0a CodeMsg = 0x0b - SendTxMsg = 0x0c - GetHeaderProofsMsg = 0x0d - HeaderProofsMsg = 0x0e - // Protocol messages belonging to LPV2 + // Protocol messages introduced in LPV2 GetProofsV2Msg = 0x0f ProofsV2Msg = 0x10 GetHelperTrieProofsMsg = 0x11 @@ -89,10 +83,7 @@ var requests = map[uint64]requestInfo{ GetBlockHeadersMsg: {"GetBlockHeaders", MaxHeaderFetch}, GetBlockBodiesMsg: {"GetBlockBodies", MaxBodyFetch}, GetReceiptsMsg: {"GetReceipts", MaxReceiptFetch}, - GetProofsV1Msg: {"GetProofsV1", MaxProofsFetch}, GetCodeMsg: {"GetCode", MaxCodeFetch}, - SendTxMsg: {"SendTx", MaxTxSend}, - GetHeaderProofsMsg: {"GetHeaderProofs", MaxHelperTrieProofsFetch}, GetProofsV2Msg: {"GetProofsV2", MaxProofsFetch}, GetHelperTrieProofsMsg: {"GetHelperTrieProofs", MaxHelperTrieProofsFetch}, SendTxV2Msg: {"SendTxV2", MaxTxSend}, |