/
subprotocols.go
56 lines (50 loc) · 1.09 KB
/
subprotocols.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* @file
* @copyright defined in aergo/LICENSE.txt
*/
package p2pcommon
// NOTE: change const of protocols_test.go
const (
_ SubProtocol = 0x00 + iota
StatusRequest
PingRequest
PingResponse
GoAway
AddressesRequest
AddressesResponse
IssueCertificateRequest
IssueCertificateResponse
CertificateRenewedNotice
)
const (
GetBlocksRequest SubProtocol = 0x010 + iota
GetBlocksResponse
GetBlockHeadersRequest
GetBlockHeadersResponse
_ // placeholder for deprecated GetMissingRequest
_ // placeholder for deprecated GetMissingResponse
NewBlockNotice
GetAncestorRequest
GetAncestorResponse
GetHashesRequest
GetHashesResponse
GetHashByNoRequest
GetHashByNoResponse
)
const (
GetTXsRequest SubProtocol = 0x020 + iota
GetTXsResponse
NewTxNotice
)
// subprotocols for block producers and their own trusted nodes
const (
// BlockProducedNotice from block producer to trusted nodes and other bp nodes
BlockProducedNotice SubProtocol = 0x030 + iota
)
const (
_ SubProtocol = 0x3100 + iota
GetClusterRequest
GetClusterResponse
RaftWrapperMessage //
)
//go:generate stringer -type=SubProtocol