2020-07-08 12:25:58 +00:00
|
|
|
// Code generated by "stringer -type=CommandType -output=message_string.go"; DO NOT EDIT.
|
2020-05-19 11:54:51 +00:00
|
|
|
|
|
|
|
package network
|
|
|
|
|
|
|
|
import "strconv"
|
|
|
|
|
|
|
|
func _() {
|
|
|
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
|
|
|
// Re-run the stringer command to generate them again.
|
|
|
|
var x [1]struct{}
|
|
|
|
_ = x[CMDVersion-0]
|
|
|
|
_ = x[CMDVerack-1]
|
|
|
|
_ = x[CMDGetAddr-16]
|
|
|
|
_ = x[CMDAddr-17]
|
|
|
|
_ = x[CMDPing-24]
|
|
|
|
_ = x[CMDPong-25]
|
|
|
|
_ = x[CMDGetHeaders-32]
|
|
|
|
_ = x[CMDHeaders-33]
|
|
|
|
_ = x[CMDGetBlocks-36]
|
|
|
|
_ = x[CMDMempool-37]
|
|
|
|
_ = x[CMDInv-39]
|
|
|
|
_ = x[CMDGetData-40]
|
2020-07-31 10:58:22 +00:00
|
|
|
_ = x[CMDGetBlockByIndex-41]
|
2020-07-08 12:25:58 +00:00
|
|
|
_ = x[CMDNotFound-42]
|
2020-05-19 11:54:51 +00:00
|
|
|
_ = x[CMDTX-43]
|
|
|
|
_ = x[CMDBlock-44]
|
2021-01-14 13:38:40 +00:00
|
|
|
_ = x[CMDExtensible-46]
|
|
|
|
_ = x[CMDP2PNotaryRequest-80]
|
2021-07-30 13:57:42 +00:00
|
|
|
_ = x[CMDGetMPTData-81]
|
|
|
|
_ = x[CMDMPTData-82]
|
2020-05-19 11:54:51 +00:00
|
|
|
_ = x[CMDReject-47]
|
|
|
|
_ = x[CMDFilterLoad-48]
|
|
|
|
_ = x[CMDFilterAdd-49]
|
|
|
|
_ = x[CMDFilterClear-50]
|
|
|
|
_ = x[CMDMerkleBlock-56]
|
|
|
|
_ = x[CMDAlert-64]
|
|
|
|
}
|
|
|
|
|
|
|
|
const (
|
|
|
|
_CommandType_name_0 = "CMDVersionCMDVerack"
|
|
|
|
_CommandType_name_1 = "CMDGetAddrCMDAddr"
|
|
|
|
_CommandType_name_2 = "CMDPingCMDPong"
|
|
|
|
_CommandType_name_3 = "CMDGetHeadersCMDHeaders"
|
|
|
|
_CommandType_name_4 = "CMDGetBlocksCMDMempool"
|
2021-01-14 13:38:40 +00:00
|
|
|
_CommandType_name_5 = "CMDInvCMDGetDataCMDGetBlockByIndexCMDNotFoundCMDTXCMDBlock"
|
|
|
|
_CommandType_name_6 = "CMDExtensibleCMDRejectCMDFilterLoadCMDFilterAddCMDFilterClear"
|
2020-05-22 12:43:46 +00:00
|
|
|
_CommandType_name_7 = "CMDMerkleBlock"
|
|
|
|
_CommandType_name_8 = "CMDAlert"
|
2021-07-30 13:57:42 +00:00
|
|
|
_CommandType_name_9 = "CMDP2PNotaryRequestCMDGetMPTDataCMDMPTData"
|
2020-05-19 11:54:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
_CommandType_index_0 = [...]uint8{0, 10, 19}
|
|
|
|
_CommandType_index_1 = [...]uint8{0, 10, 17}
|
|
|
|
_CommandType_index_2 = [...]uint8{0, 7, 14}
|
|
|
|
_CommandType_index_3 = [...]uint8{0, 13, 23}
|
|
|
|
_CommandType_index_4 = [...]uint8{0, 12, 22}
|
2021-01-14 13:38:40 +00:00
|
|
|
_CommandType_index_5 = [...]uint8{0, 6, 16, 34, 45, 50, 58}
|
|
|
|
_CommandType_index_6 = [...]uint8{0, 13, 22, 35, 47, 61}
|
2021-07-30 13:57:42 +00:00
|
|
|
_CommandType_index_9 = [...]uint8{0, 19, 32, 42}
|
2020-05-19 11:54:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func (i CommandType) String() string {
|
|
|
|
switch {
|
2023-10-18 20:21:47 +00:00
|
|
|
case i <= 1:
|
2020-05-19 11:54:51 +00:00
|
|
|
return _CommandType_name_0[_CommandType_index_0[i]:_CommandType_index_0[i+1]]
|
|
|
|
case 16 <= i && i <= 17:
|
|
|
|
i -= 16
|
|
|
|
return _CommandType_name_1[_CommandType_index_1[i]:_CommandType_index_1[i+1]]
|
|
|
|
case 24 <= i && i <= 25:
|
|
|
|
i -= 24
|
|
|
|
return _CommandType_name_2[_CommandType_index_2[i]:_CommandType_index_2[i+1]]
|
|
|
|
case 32 <= i && i <= 33:
|
|
|
|
i -= 32
|
|
|
|
return _CommandType_name_3[_CommandType_index_3[i]:_CommandType_index_3[i+1]]
|
|
|
|
case 36 <= i && i <= 37:
|
|
|
|
i -= 36
|
|
|
|
return _CommandType_name_4[_CommandType_index_4[i]:_CommandType_index_4[i+1]]
|
2021-01-14 13:38:40 +00:00
|
|
|
case 39 <= i && i <= 44:
|
2020-05-19 11:54:51 +00:00
|
|
|
i -= 39
|
|
|
|
return _CommandType_name_5[_CommandType_index_5[i]:_CommandType_index_5[i+1]]
|
2021-01-14 13:38:40 +00:00
|
|
|
case 46 <= i && i <= 50:
|
|
|
|
i -= 46
|
2020-05-22 12:43:46 +00:00
|
|
|
return _CommandType_name_6[_CommandType_index_6[i]:_CommandType_index_6[i+1]]
|
2020-05-19 11:54:51 +00:00
|
|
|
case i == 56:
|
2020-05-22 12:43:46 +00:00
|
|
|
return _CommandType_name_7
|
2020-05-19 11:54:51 +00:00
|
|
|
case i == 64:
|
2020-05-22 12:43:46 +00:00
|
|
|
return _CommandType_name_8
|
2021-07-30 13:57:42 +00:00
|
|
|
case 80 <= i && i <= 82:
|
|
|
|
i -= 80
|
|
|
|
return _CommandType_name_9[_CommandType_index_9[i]:_CommandType_index_9[i+1]]
|
2020-05-19 11:54:51 +00:00
|
|
|
default:
|
|
|
|
return "CommandType(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
|
|
}
|
|
|
|
}
|