Commit ea797d9e authored by Kirill Smelkov's avatar Kirill Smelkov

go/neo/proto: Unexport Msg.NEOMsgCode

It is internal detail that ideally should not get outside of proto
package. Don't clutter documentation of all messages with it.

-> For now access message code via proto.MsgCode(msg) from outside.
parent e7a58934
......@@ -1326,7 +1326,7 @@ func pktEncode(connId uint32, msg proto.Msg) *pktBuf {
h := buf.Header()
h.ConnId = packed.Hton32(connId)
h.MsgCode = packed.Hton16(msg.NEOMsgCode())
h.MsgCode = packed.Hton16(proto.MsgCode(msg))
h.MsgLen = packed.Hton32(uint32(l)) // XXX casting: think again
msg.NEOMsgEncode(buf.Payload())
......@@ -1427,7 +1427,7 @@ func (c *Conn) Expect(msgv ...proto.Msg) (which int, err error) {
}
for i, msg := range msgv {
if msg.NEOMsgCode() == msgCode {
if proto.MsgCode(msg) == msgCode {
_, err := msg.NEOMsgDecode(payload)
if err != nil {
return -1, c.err("decode", err)
......
......@@ -159,7 +159,7 @@ func (t *T) xverifyPkt(pkt *pktBuf, connid uint32, msgcode uint16, payload []byt
func (t *T) xverifyPktMsg(pkt *pktBuf, connid uint32, msg proto.Msg) {
data := make([]byte, msg.NEOMsgEncodedLen())
msg.NEOMsgEncode(data)
t.xverifyPkt(pkt, connid, msg.NEOMsgCode(), data)
t.xverifyPkt(pkt, connid, proto.MsgCode(msg), data)
}
// delay a bit.
......
......@@ -32,6 +32,11 @@ import (
"time"
)
// MsgCode returns code the corresponds to type of the message.
func MsgCode(msg Msg) uint16 {
return msg.neoMsgCode()
}
// MsgType looks up message type by message code.
//
// Nil is returned if message code is not valid.
......
// Copyright (C) 2006-2020 Nexedi SA and Contributors.
// Copyright (C) 2006-2021 Nexedi SA and Contributors.
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
......@@ -113,9 +113,9 @@ type PktHeader struct {
type Msg interface {
// marshal/unmarshal into/from wire format:
// NEOMsgCode returns message code needed to be used for particular message type
// neoMsgCode returns message code needed to be used for particular message type
// on the wire.
NEOMsgCode() uint16
neoMsgCode() uint16
// NEOMsgEncodedLen returns how much space is needed to encode current message payload.
NEOMsgEncodedLen() int
......
// Copyright (C) 2016-2020 Nexedi SA and Contributors.
// Copyright (C) 2016-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -90,7 +90,7 @@ func testMsgMarshal(t *testing.T, msg Msg, encoded string) {
}()
// msg.encode() == expected
msgCode := msg.NEOMsgCode()
msgCode := msg.neoMsgCode()
n := msg.NEOMsgEncodedLen()
msgType := MsgType(msgCode)
if msgType != typ {
......
......@@ -25,7 +25,7 @@ NEO. Protocol module. Code generator
This program generates marshalling code for message types defined in proto.go .
For every type 4 methods are generated in accordance with neo.Msg interface:
NEOMsgCode() uint16
neoMsgCode() uint16
NEOMsgEncodedLen() int
NEOMsgEncode(buf []byte)
NEOMsgDecode(data []byte) (nread int, err error)
......@@ -355,7 +355,7 @@ import (
fmt.Fprintf(&buf, "// %s. %s\n\n", msgCode, typename)
buf.emit("func (*%s) NEOMsgCode() uint16 {", typename)
buf.emit("func (*%s) neoMsgCode() uint16 {", typename)
buf.emit("return %s", msgCode)
buf.emit("}\n")
......
......@@ -17,7 +17,7 @@ import (
// 0 | answerBit. Error
func (*Error) NEOMsgCode() uint16 {
func (*Error) neoMsgCode() uint16 {
return 0 | answerBit
}
......@@ -60,7 +60,7 @@ overflow:
// 1. RequestIdentification
func (*RequestIdentification) NEOMsgCode() uint16 {
func (*RequestIdentification) neoMsgCode() uint16 {
return 1
}
......@@ -206,7 +206,7 @@ overflow:
// 1 | answerBit. AcceptIdentification
func (*AcceptIdentification) NEOMsgCode() uint16 {
func (*AcceptIdentification) neoMsgCode() uint16 {
return 1 | answerBit
}
......@@ -235,7 +235,7 @@ overflow:
// 2. Ping
func (*Ping) NEOMsgCode() uint16 {
func (*Ping) neoMsgCode() uint16 {
return 2
}
......@@ -252,7 +252,7 @@ func (p *Ping) NEOMsgDecode(data []byte) (int, error) {
// 2 | answerBit. Pong
func (*Pong) NEOMsgCode() uint16 {
func (*Pong) neoMsgCode() uint16 {
return 2 | answerBit
}
......@@ -269,7 +269,7 @@ func (p *Pong) NEOMsgDecode(data []byte) (int, error) {
// 3. CloseClient
func (*CloseClient) NEOMsgCode() uint16 {
func (*CloseClient) neoMsgCode() uint16 {
return 3
}
......@@ -286,7 +286,7 @@ func (p *CloseClient) NEOMsgDecode(data []byte) (int, error) {
// 4. PrimaryMaster
func (*PrimaryMaster) NEOMsgCode() uint16 {
func (*PrimaryMaster) neoMsgCode() uint16 {
return 4
}
......@@ -303,7 +303,7 @@ func (p *PrimaryMaster) NEOMsgDecode(data []byte) (int, error) {
// 4 | answerBit. AnswerPrimary
func (*AnswerPrimary) NEOMsgCode() uint16 {
func (*AnswerPrimary) neoMsgCode() uint16 {
return 4 | answerBit
}
......@@ -328,7 +328,7 @@ overflow:
// 5. NotPrimaryMaster
func (*NotPrimaryMaster) NEOMsgCode() uint16 {
func (*NotPrimaryMaster) neoMsgCode() uint16 {
return 5
}
......@@ -388,7 +388,7 @@ overflow:
// 6. NotifyNodeInformation
func (*NotifyNodeInformation) NEOMsgCode() uint16 {
func (*NotifyNodeInformation) neoMsgCode() uint16 {
return 6
}
......@@ -485,7 +485,7 @@ overflow:
// 7. Recovery
func (*Recovery) NEOMsgCode() uint16 {
func (*Recovery) neoMsgCode() uint16 {
return 7
}
......@@ -502,7 +502,7 @@ func (p *Recovery) NEOMsgDecode(data []byte) (int, error) {
// 7 | answerBit. AnswerRecovery
func (*AnswerRecovery) NEOMsgCode() uint16 {
func (*AnswerRecovery) neoMsgCode() uint16 {
return 7 | answerBit
}
......@@ -531,7 +531,7 @@ overflow:
// 8. LastIDs
func (*LastIDs) NEOMsgCode() uint16 {
func (*LastIDs) neoMsgCode() uint16 {
return 8
}
......@@ -548,7 +548,7 @@ func (p *LastIDs) NEOMsgDecode(data []byte) (int, error) {
// 8 | answerBit. AnswerLastIDs
func (*AnswerLastIDs) NEOMsgCode() uint16 {
func (*AnswerLastIDs) neoMsgCode() uint16 {
return 8 | answerBit
}
......@@ -575,7 +575,7 @@ overflow:
// 9. AskPartitionTable
func (*AskPartitionTable) NEOMsgCode() uint16 {
func (*AskPartitionTable) neoMsgCode() uint16 {
return 9
}
......@@ -592,7 +592,7 @@ func (p *AskPartitionTable) NEOMsgDecode(data []byte) (int, error) {
// 9 | answerBit. AnswerPartitionTable
func (*AnswerPartitionTable) NEOMsgCode() uint16 {
func (*AnswerPartitionTable) neoMsgCode() uint16 {
return 9 | answerBit
}
......@@ -672,7 +672,7 @@ overflow:
// 10. SendPartitionTable
func (*SendPartitionTable) NEOMsgCode() uint16 {
func (*SendPartitionTable) neoMsgCode() uint16 {
return 10
}
......@@ -752,7 +752,7 @@ overflow:
// 11. NotifyPartitionChanges
func (*NotifyPartitionChanges) NEOMsgCode() uint16 {
func (*NotifyPartitionChanges) neoMsgCode() uint16 {
return 11
}
......@@ -811,7 +811,7 @@ overflow:
// 12. StartOperation
func (*StartOperation) NEOMsgCode() uint16 {
func (*StartOperation) neoMsgCode() uint16 {
return 12
}
......@@ -836,7 +836,7 @@ overflow:
// 13. StopOperation
func (*StopOperation) NEOMsgCode() uint16 {
func (*StopOperation) neoMsgCode() uint16 {
return 13
}
......@@ -853,7 +853,7 @@ func (p *StopOperation) NEOMsgDecode(data []byte) (int, error) {
// 14. UnfinishedTransactions
func (*UnfinishedTransactions) NEOMsgCode() uint16 {
func (*UnfinishedTransactions) neoMsgCode() uint16 {
return 14
}
......@@ -901,7 +901,7 @@ overflow:
// 14 | answerBit. AnswerUnfinishedTransactions
func (*AnswerUnfinishedTransactions) NEOMsgCode() uint16 {
func (*AnswerUnfinishedTransactions) neoMsgCode() uint16 {
return 14 | answerBit
}
......@@ -951,7 +951,7 @@ overflow:
// 15. LockedTransactions
func (*LockedTransactions) NEOMsgCode() uint16 {
func (*LockedTransactions) neoMsgCode() uint16 {
return 15
}
......@@ -968,7 +968,7 @@ func (p *LockedTransactions) NEOMsgDecode(data []byte) (int, error) {
// 15 | answerBit. AnswerLockedTransactions
func (*AnswerLockedTransactions) NEOMsgCode() uint16 {
func (*AnswerLockedTransactions) neoMsgCode() uint16 {
return 15 | answerBit
}
......@@ -1022,7 +1022,7 @@ overflow:
// 16. FinalTID
func (*FinalTID) NEOMsgCode() uint16 {
func (*FinalTID) neoMsgCode() uint16 {
return 16
}
......@@ -1047,7 +1047,7 @@ overflow:
// 16 | answerBit. AnswerFinalTID
func (*AnswerFinalTID) NEOMsgCode() uint16 {
func (*AnswerFinalTID) neoMsgCode() uint16 {
return 16 | answerBit
}
......@@ -1072,7 +1072,7 @@ overflow:
// 17. ValidateTransaction
func (*ValidateTransaction) NEOMsgCode() uint16 {
func (*ValidateTransaction) neoMsgCode() uint16 {
return 17
}
......@@ -1099,7 +1099,7 @@ overflow:
// 18. BeginTransaction
func (*BeginTransaction) NEOMsgCode() uint16 {
func (*BeginTransaction) neoMsgCode() uint16 {
return 18
}
......@@ -1124,7 +1124,7 @@ overflow:
// 18 | answerBit. AnswerBeginTransaction
func (*AnswerBeginTransaction) NEOMsgCode() uint16 {
func (*AnswerBeginTransaction) neoMsgCode() uint16 {
return 18 | answerBit
}
......@@ -1149,7 +1149,7 @@ overflow:
// 19. FailedVote
func (*FailedVote) NEOMsgCode() uint16 {
func (*FailedVote) neoMsgCode() uint16 {
return 19
}
......@@ -1199,7 +1199,7 @@ overflow:
// 20. FinishTransaction
func (*FinishTransaction) NEOMsgCode() uint16 {
func (*FinishTransaction) neoMsgCode() uint16 {
return 20
}
......@@ -1273,7 +1273,7 @@ overflow:
// 20 | answerBit. AnswerTransactionFinished
func (*AnswerTransactionFinished) NEOMsgCode() uint16 {
func (*AnswerTransactionFinished) neoMsgCode() uint16 {
return 20 | answerBit
}
......@@ -1300,7 +1300,7 @@ overflow:
// 21. LockInformation
func (*LockInformation) NEOMsgCode() uint16 {
func (*LockInformation) neoMsgCode() uint16 {
return 21
}
......@@ -1327,7 +1327,7 @@ overflow:
// 21 | answerBit. AnswerInformationLocked
func (*AnswerInformationLocked) NEOMsgCode() uint16 {
func (*AnswerInformationLocked) neoMsgCode() uint16 {
return 21 | answerBit
}
......@@ -1352,7 +1352,7 @@ overflow:
// 22. InvalidateObjects
func (*InvalidateObjects) NEOMsgCode() uint16 {
func (*InvalidateObjects) neoMsgCode() uint16 {
return 22
}
......@@ -1402,7 +1402,7 @@ overflow:
// 23. NotifyUnlockInformation
func (*NotifyUnlockInformation) NEOMsgCode() uint16 {
func (*NotifyUnlockInformation) neoMsgCode() uint16 {
return 23
}
......@@ -1427,7 +1427,7 @@ overflow:
// 24. AskNewOIDs
func (*AskNewOIDs) NEOMsgCode() uint16 {
func (*AskNewOIDs) neoMsgCode() uint16 {
return 24
}
......@@ -1452,7 +1452,7 @@ overflow:
// 24 | answerBit. AnswerNewOIDs
func (*AnswerNewOIDs) NEOMsgCode() uint16 {
func (*AnswerNewOIDs) neoMsgCode() uint16 {
return 24 | answerBit
}
......@@ -1500,7 +1500,7 @@ overflow:
// 25. NotifyDeadlock
func (*NotifyDeadlock) NEOMsgCode() uint16 {
func (*NotifyDeadlock) neoMsgCode() uint16 {
return 25
}
......@@ -1527,7 +1527,7 @@ overflow:
// 26. RebaseTransaction
func (*RebaseTransaction) NEOMsgCode() uint16 {
func (*RebaseTransaction) neoMsgCode() uint16 {
return 26
}
......@@ -1554,7 +1554,7 @@ overflow:
// 26 | answerBit. AnswerRebaseTransaction
func (*AnswerRebaseTransaction) NEOMsgCode() uint16 {
func (*AnswerRebaseTransaction) neoMsgCode() uint16 {
return 26 | answerBit
}
......@@ -1602,7 +1602,7 @@ overflow:
// 27. RebaseObject
func (*RebaseObject) NEOMsgCode() uint16 {
func (*RebaseObject) neoMsgCode() uint16 {
return 27
}
......@@ -1629,7 +1629,7 @@ overflow:
// 27 | answerBit. AnswerRebaseObject
func (*AnswerRebaseObject) NEOMsgCode() uint16 {
func (*AnswerRebaseObject) neoMsgCode() uint16 {
return 27 | answerBit
}
......@@ -1679,7 +1679,7 @@ overflow:
// 28. StoreObject
func (*StoreObject) NEOMsgCode() uint16 {
func (*StoreObject) neoMsgCode() uint16 {
return 28
}
......@@ -1733,7 +1733,7 @@ overflow:
// 28 | answerBit. AnswerStoreObject
func (*AnswerStoreObject) NEOMsgCode() uint16 {
func (*AnswerStoreObject) neoMsgCode() uint16 {
return 28 | answerBit
}
......@@ -1758,7 +1758,7 @@ overflow:
// 29. AbortTransaction
func (*AbortTransaction) NEOMsgCode() uint16 {
func (*AbortTransaction) neoMsgCode() uint16 {
return 29
}
......@@ -1808,7 +1808,7 @@ overflow:
// 30. StoreTransaction
func (*StoreTransaction) NEOMsgCode() uint16 {
func (*StoreTransaction) neoMsgCode() uint16 {
return 30
}
......@@ -1909,7 +1909,7 @@ overflow:
// 30 | answerBit. AnswerStoreTransaction
func (*AnswerStoreTransaction) NEOMsgCode() uint16 {
func (*AnswerStoreTransaction) neoMsgCode() uint16 {
return 30 | answerBit
}
......@@ -1926,7 +1926,7 @@ func (p *AnswerStoreTransaction) NEOMsgDecode(data []byte) (int, error) {
// 31. VoteTransaction
func (*VoteTransaction) NEOMsgCode() uint16 {
func (*VoteTransaction) neoMsgCode() uint16 {
return 31
}
......@@ -1951,7 +1951,7 @@ overflow:
// 31 | answerBit. AnswerVoteTransaction
func (*AnswerVoteTransaction) NEOMsgCode() uint16 {
func (*AnswerVoteTransaction) neoMsgCode() uint16 {
return 31 | answerBit
}
......@@ -1968,7 +1968,7 @@ func (p *AnswerVoteTransaction) NEOMsgDecode(data []byte) (int, error) {
// 32. GetObject
func (*GetObject) NEOMsgCode() uint16 {
func (*GetObject) neoMsgCode() uint16 {
return 32
}
......@@ -1997,7 +1997,7 @@ overflow:
// 32 | answerBit. AnswerObject
func (*AnswerObject) NEOMsgCode() uint16 {
func (*AnswerObject) neoMsgCode() uint16 {
return 32 | answerBit
}
......@@ -2051,7 +2051,7 @@ overflow:
// 33. AskTIDs
func (*AskTIDs) NEOMsgCode() uint16 {
func (*AskTIDs) neoMsgCode() uint16 {
return 33
}
......@@ -2080,7 +2080,7 @@ overflow:
// 33 | answerBit. AnswerTIDs
func (*AnswerTIDs) NEOMsgCode() uint16 {
func (*AnswerTIDs) neoMsgCode() uint16 {
return 33 | answerBit
}
......@@ -2128,7 +2128,7 @@ overflow:
// 34. TransactionInformation
func (*TransactionInformation) NEOMsgCode() uint16 {
func (*TransactionInformation) neoMsgCode() uint16 {
return 34
}
......@@ -2153,7 +2153,7 @@ overflow:
// 34 | answerBit. AnswerTransactionInformation
func (*AnswerTransactionInformation) NEOMsgCode() uint16 {
func (*AnswerTransactionInformation) neoMsgCode() uint16 {
return 34 | answerBit
}
......@@ -2256,7 +2256,7 @@ overflow:
// 35. ObjectHistory
func (*ObjectHistory) NEOMsgCode() uint16 {
func (*ObjectHistory) neoMsgCode() uint16 {
return 35
}
......@@ -2285,7 +2285,7 @@ overflow:
// 35 | answerBit. AnswerObjectHistory
func (*AnswerObjectHistory) NEOMsgCode() uint16 {
func (*AnswerObjectHistory) neoMsgCode() uint16 {
return 35 | answerBit
}
......@@ -2340,7 +2340,7 @@ overflow:
// 36. PartitionList
func (*PartitionList) NEOMsgCode() uint16 {
func (*PartitionList) neoMsgCode() uint16 {
return 36
}
......@@ -2369,7 +2369,7 @@ overflow:
// 36 | answerBit. AnswerPartitionList
func (*AnswerPartitionList) NEOMsgCode() uint16 {
func (*AnswerPartitionList) neoMsgCode() uint16 {
return 36 | answerBit
}
......@@ -2449,7 +2449,7 @@ overflow:
// 37. NodeList
func (*NodeList) NEOMsgCode() uint16 {
func (*NodeList) neoMsgCode() uint16 {
return 37
}
......@@ -2474,7 +2474,7 @@ overflow:
// 37 | answerBit. AnswerNodeList
func (*AnswerNodeList) NEOMsgCode() uint16 {
func (*AnswerNodeList) neoMsgCode() uint16 {
return 37 | answerBit
}
......@@ -2559,7 +2559,7 @@ overflow:
// 38. SetNodeState
func (*SetNodeState) NEOMsgCode() uint16 {
func (*SetNodeState) neoMsgCode() uint16 {
return 38
}
......@@ -2586,7 +2586,7 @@ overflow:
// 39. AddPendingNodes
func (*AddPendingNodes) NEOMsgCode() uint16 {
func (*AddPendingNodes) neoMsgCode() uint16 {
return 39
}
......@@ -2634,7 +2634,7 @@ overflow:
// 40. TweakPartitionTable
func (*TweakPartitionTable) NEOMsgCode() uint16 {
func (*TweakPartitionTable) neoMsgCode() uint16 {
return 40
}
......@@ -2684,7 +2684,7 @@ overflow:
// 40 | answerBit. AnswerTweakPartitionTable
func (*AnswerTweakPartitionTable) NEOMsgCode() uint16 {
func (*AnswerTweakPartitionTable) neoMsgCode() uint16 {
return 40 | answerBit
}
......@@ -2762,7 +2762,7 @@ overflow:
// 41. SetNumReplicas
func (*SetNumReplicas) NEOMsgCode() uint16 {
func (*SetNumReplicas) neoMsgCode() uint16 {
return 41
}
......@@ -2787,7 +2787,7 @@ overflow:
// 42. SetClusterState
func (*SetClusterState) NEOMsgCode() uint16 {
func (*SetClusterState) neoMsgCode() uint16 {
return 42
}
......@@ -2812,7 +2812,7 @@ overflow:
// 43. Repair
func (*Repair) NEOMsgCode() uint16 {
func (*Repair) neoMsgCode() uint16 {
return 43
}
......@@ -2862,7 +2862,7 @@ overflow:
// 44. RepairOne
func (*RepairOne) NEOMsgCode() uint16 {
func (*RepairOne) neoMsgCode() uint16 {
return 44
}
......@@ -2887,7 +2887,7 @@ overflow:
// 45. NotifyClusterState
func (*NotifyClusterState) NEOMsgCode() uint16 {
func (*NotifyClusterState) neoMsgCode() uint16 {
return 45
}
......@@ -2912,7 +2912,7 @@ overflow:
// 46. AskClusterState
func (*AskClusterState) NEOMsgCode() uint16 {
func (*AskClusterState) neoMsgCode() uint16 {
return 46
}
......@@ -2929,7 +2929,7 @@ func (p *AskClusterState) NEOMsgDecode(data []byte) (int, error) {
// 46 | answerBit. AnswerClusterState
func (*AnswerClusterState) NEOMsgCode() uint16 {
func (*AnswerClusterState) neoMsgCode() uint16 {
return 46 | answerBit
}
......@@ -2954,7 +2954,7 @@ overflow:
// 47. ObjectUndoSerial
func (*ObjectUndoSerial) NEOMsgCode() uint16 {
func (*ObjectUndoSerial) neoMsgCode() uint16 {
return 47
}
......@@ -3008,7 +3008,7 @@ overflow:
// 47 | answerBit. AnswerObjectUndoSerial
func (*AnswerObjectUndoSerial) NEOMsgCode() uint16 {
func (*AnswerObjectUndoSerial) neoMsgCode() uint16 {
return 47 | answerBit
}
......@@ -3076,7 +3076,7 @@ overflow:
// 48. AskTIDsFrom
func (*AskTIDsFrom) NEOMsgCode() uint16 {
func (*AskTIDsFrom) neoMsgCode() uint16 {
return 48
}
......@@ -3107,7 +3107,7 @@ overflow:
// 48 | answerBit. AnswerTIDsFrom
func (*AnswerTIDsFrom) NEOMsgCode() uint16 {
func (*AnswerTIDsFrom) neoMsgCode() uint16 {
return 48 | answerBit
}
......@@ -3155,7 +3155,7 @@ overflow:
// 49. Pack
func (*Pack) NEOMsgCode() uint16 {
func (*Pack) neoMsgCode() uint16 {
return 49
}
......@@ -3180,7 +3180,7 @@ overflow:
// 49 | answerBit. AnswerPack
func (*AnswerPack) NEOMsgCode() uint16 {
func (*AnswerPack) neoMsgCode() uint16 {
return 49 | answerBit
}
......@@ -3205,7 +3205,7 @@ overflow:
// 50. CheckReplicas
func (*CheckReplicas) NEOMsgCode() uint16 {
func (*CheckReplicas) neoMsgCode() uint16 {
return 50
}
......@@ -3263,7 +3263,7 @@ overflow:
// 51. CheckPartition
func (*CheckPartition) NEOMsgCode() uint16 {
func (*CheckPartition) neoMsgCode() uint16 {
return 51
}
......@@ -3325,7 +3325,7 @@ overflow:
// 52. CheckTIDRange
func (*CheckTIDRange) NEOMsgCode() uint16 {
func (*CheckTIDRange) neoMsgCode() uint16 {
return 52
}
......@@ -3356,7 +3356,7 @@ overflow:
// 52 | answerBit. AnswerCheckTIDRange
func (*AnswerCheckTIDRange) NEOMsgCode() uint16 {
func (*AnswerCheckTIDRange) neoMsgCode() uint16 {
return 52 | answerBit
}
......@@ -3385,7 +3385,7 @@ overflow:
// 53. CheckSerialRange
func (*CheckSerialRange) NEOMsgCode() uint16 {
func (*CheckSerialRange) neoMsgCode() uint16 {
return 53
}
......@@ -3418,7 +3418,7 @@ overflow:
// 53 | answerBit. AnswerCheckSerialRange
func (*AnswerCheckSerialRange) NEOMsgCode() uint16 {
func (*AnswerCheckSerialRange) neoMsgCode() uint16 {
return 53 | answerBit
}
......@@ -3451,7 +3451,7 @@ overflow:
// 54. PartitionCorrupted
func (*PartitionCorrupted) NEOMsgCode() uint16 {
func (*PartitionCorrupted) neoMsgCode() uint16 {
return 54
}
......@@ -3501,7 +3501,7 @@ overflow:
// 55. NotifyReady
func (*NotifyReady) NEOMsgCode() uint16 {
func (*NotifyReady) neoMsgCode() uint16 {
return 55
}
......@@ -3518,7 +3518,7 @@ func (p *NotifyReady) NEOMsgDecode(data []byte) (int, error) {
// 56. LastTransaction
func (*LastTransaction) NEOMsgCode() uint16 {
func (*LastTransaction) neoMsgCode() uint16 {
return 56
}
......@@ -3535,7 +3535,7 @@ func (p *LastTransaction) NEOMsgDecode(data []byte) (int, error) {
// 56 | answerBit. AnswerLastTransaction
func (*AnswerLastTransaction) NEOMsgCode() uint16 {
func (*AnswerLastTransaction) neoMsgCode() uint16 {
return 56 | answerBit
}
......@@ -3560,7 +3560,7 @@ overflow:
// 57. CheckCurrentSerial
func (*CheckCurrentSerial) NEOMsgCode() uint16 {
func (*CheckCurrentSerial) neoMsgCode() uint16 {
return 57
}
......@@ -3589,7 +3589,7 @@ overflow:
// 57 | answerBit. AnswerCheckCurrentSerial
func (*AnswerCheckCurrentSerial) NEOMsgCode() uint16 {
func (*AnswerCheckCurrentSerial) neoMsgCode() uint16 {
return 57 | answerBit
}
......@@ -3614,7 +3614,7 @@ overflow:
// 58. NotifyTransactionFinished
func (*NotifyTransactionFinished) NEOMsgCode() uint16 {
func (*NotifyTransactionFinished) neoMsgCode() uint16 {
return 58
}
......@@ -3641,7 +3641,7 @@ overflow:
// 59. Replicate
func (*Replicate) NEOMsgCode() uint16 {
func (*Replicate) neoMsgCode() uint16 {
return 59
}
......@@ -3732,7 +3732,7 @@ overflow:
// 60. ReplicationDone
func (*ReplicationDone) NEOMsgCode() uint16 {
func (*ReplicationDone) neoMsgCode() uint16 {
return 60
}
......@@ -3759,7 +3759,7 @@ overflow:
// 61. FetchTransactions
func (*FetchTransactions) NEOMsgCode() uint16 {
func (*FetchTransactions) neoMsgCode() uint16 {
return 61
}
......@@ -3815,7 +3815,7 @@ overflow:
// 61 | answerBit. AnswerFetchTransactions
func (*AnswerFetchTransactions) NEOMsgCode() uint16 {
func (*AnswerFetchTransactions) neoMsgCode() uint16 {
return 61 | answerBit
}
......@@ -3867,7 +3867,7 @@ overflow:
// 62. FetchObjects
func (*FetchObjects) NEOMsgCode() uint16 {
func (*FetchObjects) neoMsgCode() uint16 {
return 62
}
......@@ -3958,7 +3958,7 @@ overflow:
// 62 | answerBit. AnswerFetchObjects
func (*AnswerFetchObjects) NEOMsgCode() uint16 {
func (*AnswerFetchObjects) neoMsgCode() uint16 {
return 62 | answerBit
}
......@@ -4045,7 +4045,7 @@ overflow:
// 63. AddTransaction
func (*AddTransaction) NEOMsgCode() uint16 {
func (*AddTransaction) neoMsgCode() uint16 {
return 63
}
......@@ -4150,7 +4150,7 @@ overflow:
// 64. AddObject
func (*AddObject) NEOMsgCode() uint16 {
func (*AddObject) neoMsgCode() uint16 {
return 64
}
......@@ -4202,7 +4202,7 @@ overflow:
// 65. Truncate
func (*Truncate) NEOMsgCode() uint16 {
func (*Truncate) neoMsgCode() uint16 {
return 65
}
......@@ -4227,7 +4227,7 @@ overflow:
// 66. FlushLog
func (*FlushLog) NEOMsgCode() uint16 {
func (*FlushLog) neoMsgCode() uint16 {
return 66
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment