Commit ff786dd0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 368f5366
...@@ -23,7 +23,11 @@ package neo ...@@ -23,7 +23,11 @@ package neo
// This file defines everything that relates to messages on the wire. // This file defines everything that relates to messages on the wire.
// In particular every type that is included in a message is defined here as well. // In particular every type that is included in a message is defined here as well.
// XXX neo:proto justtype //
// By default a structure defined in this file becomes a separate network message.
// If a structure is defined only to represent basic type that is included in
// several messages and does not itself denote a separate message, its
// definition is prefixed with `//neo:proto typeonly` comment.
// XXX neo:proto answerto x? (btw just needs "answer" flag) // XXX neo:proto answerto x? (btw just needs "answer" flag)
// TODO regroup messages definitions to stay more close to 1 communication topic // TODO regroup messages definitions to stay more close to 1 communication topic
...@@ -256,7 +260,7 @@ func float64_NEODecode(b []byte) float64 { ...@@ -256,7 +260,7 @@ func float64_NEODecode(b []byte) float64 {
} }
// NodeInfo is information about a node // NodeInfo is information about a node
// FIXME not pkt //neo:proto typeonly
type NodeInfo struct { type NodeInfo struct {
Type NodeType Type NodeType
Addr Address // serving address Addr Address // serving address
...@@ -265,13 +269,13 @@ type NodeInfo struct { ...@@ -265,13 +269,13 @@ type NodeInfo struct {
IdTimestamp float64 // FIXME clarify semantic where it is used IdTimestamp float64 // FIXME clarify semantic where it is used
} }
// FIXME not pkt //neo:proto typeonly
type CellInfo struct { type CellInfo struct {
UUID NodeUUID UUID NodeUUID
State CellState State CellState
} }
// FIXME not pkt //neo:proto typeonly
type RowInfo struct { type RowInfo struct {
Offset uint32 // PNumber XXX -> Pid Offset uint32 // PNumber XXX -> Pid
CellList []CellInfo CellList []CellInfo
......
...@@ -144,7 +144,7 @@ func loadPkg(pkgPath string, sources ...string) *types.Package { ...@@ -144,7 +144,7 @@ func loadPkg(pkgPath string, sources ...string) *types.Package {
// parse // parse
for _, src := range sources { for _, src := range sources {
f, err := parser.ParseFile(fset, src, nil, 0) f, err := parser.ParseFile(fset, src, nil, parser.ParseComments)
if err != nil { if err != nil {
log.Fatalf("parse: %v", err) log.Fatalf("parse: %v", err)
} }
...@@ -165,6 +165,39 @@ func loadPkg(pkgPath string, sources ...string) *types.Package { ...@@ -165,6 +165,39 @@ func loadPkg(pkgPath string, sources ...string) *types.Package {
return pkg return pkg
} }
// `//neo:proto ...` annotations
type Annotation struct {
typeonly bool
}
// parse checks doc for specific comment annotations and, if present, loads them.
func (a *Annotation) parse(doc *ast.CommentGroup) {
if doc == nil {
return // for many types .Doc = nil if there is no comments
}
for _, comment := range doc.List {
cpos := pos(comment)
if !(cpos.Column == 1 && strings.HasPrefix(comment.Text, "//neo:proto ")) {
continue
}
__ := strings.SplitN(comment.Text, " ", 2)
arg := __[1]
switch arg {
case "typeonly":
if a.typeonly {
log.Fatalf("%v: duplicate typeonly", cpos)
}
a.typeonly = true
default:
log.Fatalf("%v: unknown neo:proto directive %q", cpos, arg)
}
}
}
func main() { func main() {
var err error var err error
...@@ -206,29 +239,41 @@ import ( ...@@ -206,29 +239,41 @@ import (
//ast.Print(fset, gendecl) //ast.Print(fset, gendecl)
//continue //continue
// `//neo:proto ...` annotations for whole decl
// (e.g. <here> type ( t1 struct{...}; t2 struct{...} )
declAnnotation := Annotation{}
declAnnotation.parse(gendecl.Doc)
for _, spec := range gendecl.Specs { for _, spec := range gendecl.Specs {
typespec := spec.(*ast.TypeSpec) // must be because tok = TYPE typespec := spec.(*ast.TypeSpec) // must be because tok = TYPE
typename := typespec.Name.Name typename := typespec.Name.Name
switch typespec.Type.(type) { // we are only interested in struct types
default: if _, ok := typespec.Type.(*ast.StructType); !ok {
// we are only interested in struct types
continue continue
}
case *ast.StructType: // `//neo:proto ...` annotation for this particular type
fmt.Fprintf(&buf, "// %d. %s\n\n", msgCode, typename) specAnnotation := declAnnotation // inheriting from decl
specAnnotation.parse(typespec.Doc)
buf.emit("func (*%s) neoMsgCode() uint16 {", typename) // type only -> don't generate message interface for it
buf.emit("return %d", msgCode) if specAnnotation.typeonly {
buf.emit("}\n") continue
}
buf.WriteString(generateCodecCode(typespec, &sizer{})) fmt.Fprintf(&buf, "// %d. %s\n\n", msgCode, typename)
buf.WriteString(generateCodecCode(typespec, &encoder{}))
buf.WriteString(generateCodecCode(typespec, &decoder{}))
msgTypeRegistry[msgCode] = typename buf.emit("func (*%s) neoMsgCode() uint16 {", typename)
msgCode++ buf.emit("return %d", msgCode)
} buf.emit("}\n")
buf.WriteString(generateCodecCode(typespec, &sizer{}))
buf.WriteString(generateCodecCode(typespec, &encoder{}))
buf.WriteString(generateCodecCode(typespec, &decoder{}))
msgTypeRegistry[msgCode] = typename
msgCode++
} }
} }
......
...@@ -57,140 +57,10 @@ overflow: ...@@ -57,140 +57,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 1. NodeInfo // 1. Error
func (*NodeInfo) neoMsgCode() uint16 {
return 1
}
func (p *NodeInfo) neoMsgEncodedLen() int {
return 26 + len(p.Addr.Host)
}
func (p *NodeInfo) neoMsgEncode(data []byte) {
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.Type)))
{
l := uint32(len(p.Addr.Host))
binary.BigEndian.PutUint32(data[4:], l)
data = data[8:]
copy(data, p.Addr.Host)
data = data[l:]
}
binary.BigEndian.PutUint16(data[0:], p.Addr.Port)
binary.BigEndian.PutUint32(data[2:], uint32(int32(p.UUID)))
binary.BigEndian.PutUint32(data[6:], uint32(int32(p.State)))
float64_NEOEncode(data[10:], p.IdTimestamp)
}
func (p *NodeInfo) neoMsgDecode(data []byte) (int, error) {
var nread uint32
if uint32(len(data)) < 8 {
goto overflow
}
p.Type = NodeType(int32(binary.BigEndian.Uint32(data[0:])))
{
l := binary.BigEndian.Uint32(data[4:])
data = data[8:]
if uint32(len(data)) < 18+l {
goto overflow
}
nread += 18 + l
p.Addr.Host = string(data[:l])
data = data[l:]
}
p.Addr.Port = binary.BigEndian.Uint16(data[0:])
p.UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[2:])))
p.State = NodeState(int32(binary.BigEndian.Uint32(data[6:])))
p.IdTimestamp = float64_NEODecode(data[10:])
return 8 + int(nread), nil
overflow:
return 0, ErrDecodeOverflow
}
// 2. CellInfo
func (*CellInfo) neoMsgCode() uint16 {
return 2
}
func (p *CellInfo) neoMsgEncodedLen() int {
return 8
}
func (p *CellInfo) neoMsgEncode(data []byte) {
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.UUID)))
binary.BigEndian.PutUint32(data[4:], uint32(int32(p.State)))
}
func (p *CellInfo) neoMsgDecode(data []byte) (int, error) {
if uint32(len(data)) < 8 {
goto overflow
}
p.UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[0:])))
p.State = CellState(int32(binary.BigEndian.Uint32(data[4:])))
return 8, nil
overflow:
return 0, ErrDecodeOverflow
}
// 3. RowInfo
func (*RowInfo) neoMsgCode() uint16 {
return 3
}
func (p *RowInfo) neoMsgEncodedLen() int {
return 8 + len(p.CellList)*8
}
func (p *RowInfo) neoMsgEncode(data []byte) {
binary.BigEndian.PutUint32(data[0:], p.Offset)
{
l := uint32(len(p.CellList))
binary.BigEndian.PutUint32(data[4:], l)
data = data[8:]
for i := 0; uint32(i) < l; i++ {
a := &p.CellList[i]
binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).UUID)))
binary.BigEndian.PutUint32(data[4:], uint32(int32((*a).State)))
data = data[8:]
}
}
}
func (p *RowInfo) neoMsgDecode(data []byte) (int, error) {
var nread uint32
if uint32(len(data)) < 8 {
goto overflow
}
p.Offset = binary.BigEndian.Uint32(data[0:])
{
l := binary.BigEndian.Uint32(data[4:])
data = data[8:]
if uint32(len(data)) < l*8 {
goto overflow
}
nread += l * 8
p.CellList = make([]CellInfo, l)
for i := 0; uint32(i) < l; i++ {
a := &p.CellList[i]
(*a).UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[0:])))
(*a).State = CellState(int32(binary.BigEndian.Uint32(data[4:])))
data = data[8:]
}
}
return 8 + int(nread), nil
overflow:
return 0, ErrDecodeOverflow
}
// 4. Error
func (*Error) neoMsgCode() uint16 { func (*Error) neoMsgCode() uint16 {
return 4 return 1
} }
func (p *Error) neoMsgEncodedLen() int { func (p *Error) neoMsgEncodedLen() int {
...@@ -230,10 +100,10 @@ overflow: ...@@ -230,10 +100,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 5. Ping // 2. Ping
func (*Ping) neoMsgCode() uint16 { func (*Ping) neoMsgCode() uint16 {
return 5 return 2
} }
func (p *Ping) neoMsgEncodedLen() int { func (p *Ping) neoMsgEncodedLen() int {
...@@ -247,10 +117,10 @@ func (p *Ping) neoMsgDecode(data []byte) (int, error) { ...@@ -247,10 +117,10 @@ func (p *Ping) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 6. CloseClient // 3. CloseClient
func (*CloseClient) neoMsgCode() uint16 { func (*CloseClient) neoMsgCode() uint16 {
return 6 return 3
} }
func (p *CloseClient) neoMsgEncodedLen() int { func (p *CloseClient) neoMsgEncodedLen() int {
...@@ -264,10 +134,10 @@ func (p *CloseClient) neoMsgDecode(data []byte) (int, error) { ...@@ -264,10 +134,10 @@ func (p *CloseClient) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 7. RequestIdentification // 4. RequestIdentification
func (*RequestIdentification) neoMsgCode() uint16 { func (*RequestIdentification) neoMsgCode() uint16 {
return 7 return 4
} }
func (p *RequestIdentification) neoMsgEncodedLen() int { func (p *RequestIdentification) neoMsgEncodedLen() int {
...@@ -330,10 +200,10 @@ overflow: ...@@ -330,10 +200,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 8. AcceptIdentification // 5. AcceptIdentification
func (*AcceptIdentification) neoMsgCode() uint16 { func (*AcceptIdentification) neoMsgCode() uint16 {
return 8 return 5
} }
func (p *AcceptIdentification) neoMsgEncodedLen() int { func (p *AcceptIdentification) neoMsgEncodedLen() int {
...@@ -363,10 +233,10 @@ overflow: ...@@ -363,10 +233,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 9. PrimaryMaster // 6. PrimaryMaster
func (*PrimaryMaster) neoMsgCode() uint16 { func (*PrimaryMaster) neoMsgCode() uint16 {
return 9 return 6
} }
func (p *PrimaryMaster) neoMsgEncodedLen() int { func (p *PrimaryMaster) neoMsgEncodedLen() int {
...@@ -380,10 +250,10 @@ func (p *PrimaryMaster) neoMsgDecode(data []byte) (int, error) { ...@@ -380,10 +250,10 @@ func (p *PrimaryMaster) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 10. AnswerPrimary // 7. AnswerPrimary
func (*AnswerPrimary) neoMsgCode() uint16 { func (*AnswerPrimary) neoMsgCode() uint16 {
return 10 return 7
} }
func (p *AnswerPrimary) neoMsgEncodedLen() int { func (p *AnswerPrimary) neoMsgEncodedLen() int {
...@@ -405,10 +275,10 @@ overflow: ...@@ -405,10 +275,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 11. NotPrimaryMaster // 8. NotPrimaryMaster
func (*NotPrimaryMaster) neoMsgCode() uint16 { func (*NotPrimaryMaster) neoMsgCode() uint16 {
return 11 return 8
} }
func (p *NotPrimaryMaster) neoMsgEncodedLen() int { func (p *NotPrimaryMaster) neoMsgEncodedLen() int {
...@@ -477,10 +347,10 @@ overflow: ...@@ -477,10 +347,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 12. Recovery // 9. Recovery
func (*Recovery) neoMsgCode() uint16 { func (*Recovery) neoMsgCode() uint16 {
return 12 return 9
} }
func (p *Recovery) neoMsgEncodedLen() int { func (p *Recovery) neoMsgEncodedLen() int {
...@@ -494,10 +364,10 @@ func (p *Recovery) neoMsgDecode(data []byte) (int, error) { ...@@ -494,10 +364,10 @@ func (p *Recovery) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 13. AnswerRecovery // 10. AnswerRecovery
func (*AnswerRecovery) neoMsgCode() uint16 { func (*AnswerRecovery) neoMsgCode() uint16 {
return 13 return 10
} }
func (p *AnswerRecovery) neoMsgEncodedLen() int { func (p *AnswerRecovery) neoMsgEncodedLen() int {
...@@ -523,10 +393,10 @@ overflow: ...@@ -523,10 +393,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 14. LastIDs // 11. LastIDs
func (*LastIDs) neoMsgCode() uint16 { func (*LastIDs) neoMsgCode() uint16 {
return 14 return 11
} }
func (p *LastIDs) neoMsgEncodedLen() int { func (p *LastIDs) neoMsgEncodedLen() int {
...@@ -540,10 +410,10 @@ func (p *LastIDs) neoMsgDecode(data []byte) (int, error) { ...@@ -540,10 +410,10 @@ func (p *LastIDs) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 15. AnswerLastIDs // 12. AnswerLastIDs
func (*AnswerLastIDs) neoMsgCode() uint16 { func (*AnswerLastIDs) neoMsgCode() uint16 {
return 15 return 12
} }
func (p *AnswerLastIDs) neoMsgEncodedLen() int { func (p *AnswerLastIDs) neoMsgEncodedLen() int {
...@@ -567,10 +437,10 @@ overflow: ...@@ -567,10 +437,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 16. AskPartitionTable // 13. AskPartitionTable
func (*AskPartitionTable) neoMsgCode() uint16 { func (*AskPartitionTable) neoMsgCode() uint16 {
return 16 return 13
} }
func (p *AskPartitionTable) neoMsgEncodedLen() int { func (p *AskPartitionTable) neoMsgEncodedLen() int {
...@@ -584,10 +454,10 @@ func (p *AskPartitionTable) neoMsgDecode(data []byte) (int, error) { ...@@ -584,10 +454,10 @@ func (p *AskPartitionTable) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 17. AnswerPartitionTable // 14. AnswerPartitionTable
func (*AnswerPartitionTable) neoMsgCode() uint16 { func (*AnswerPartitionTable) neoMsgCode() uint16 {
return 17 return 14
} }
func (p *AnswerPartitionTable) neoMsgEncodedLen() int { func (p *AnswerPartitionTable) neoMsgEncodedLen() int {
...@@ -664,10 +534,10 @@ overflow: ...@@ -664,10 +534,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 18. NotifyPartitionTable // 15. NotifyPartitionTable
func (*NotifyPartitionTable) neoMsgCode() uint16 { func (*NotifyPartitionTable) neoMsgCode() uint16 {
return 18 return 15
} }
func (p *NotifyPartitionTable) neoMsgEncodedLen() int { func (p *NotifyPartitionTable) neoMsgEncodedLen() int {
...@@ -744,10 +614,10 @@ overflow: ...@@ -744,10 +614,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 19. NotifyPartitionChanges // 16. NotifyPartitionChanges
func (*NotifyPartitionChanges) neoMsgCode() uint16 { func (*NotifyPartitionChanges) neoMsgCode() uint16 {
return 19 return 16
} }
func (p *NotifyPartitionChanges) neoMsgEncodedLen() int { func (p *NotifyPartitionChanges) neoMsgEncodedLen() int {
...@@ -801,10 +671,10 @@ overflow: ...@@ -801,10 +671,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 20. StartOperation // 17. StartOperation
func (*StartOperation) neoMsgCode() uint16 { func (*StartOperation) neoMsgCode() uint16 {
return 20 return 17
} }
func (p *StartOperation) neoMsgEncodedLen() int { func (p *StartOperation) neoMsgEncodedLen() int {
...@@ -826,10 +696,10 @@ overflow: ...@@ -826,10 +696,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 21. StopOperation // 18. StopOperation
func (*StopOperation) neoMsgCode() uint16 { func (*StopOperation) neoMsgCode() uint16 {
return 21 return 18
} }
func (p *StopOperation) neoMsgEncodedLen() int { func (p *StopOperation) neoMsgEncodedLen() int {
...@@ -843,10 +713,10 @@ func (p *StopOperation) neoMsgDecode(data []byte) (int, error) { ...@@ -843,10 +713,10 @@ func (p *StopOperation) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 22. UnfinishedTransactions // 19. UnfinishedTransactions
func (*UnfinishedTransactions) neoMsgCode() uint16 { func (*UnfinishedTransactions) neoMsgCode() uint16 {
return 22 return 19
} }
func (p *UnfinishedTransactions) neoMsgEncodedLen() int { func (p *UnfinishedTransactions) neoMsgEncodedLen() int {
...@@ -891,10 +761,10 @@ overflow: ...@@ -891,10 +761,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 23. AnswerUnfinishedTransactions // 20. AnswerUnfinishedTransactions
func (*AnswerUnfinishedTransactions) neoMsgCode() uint16 { func (*AnswerUnfinishedTransactions) neoMsgCode() uint16 {
return 23 return 20
} }
func (p *AnswerUnfinishedTransactions) neoMsgEncodedLen() int { func (p *AnswerUnfinishedTransactions) neoMsgEncodedLen() int {
...@@ -941,10 +811,10 @@ overflow: ...@@ -941,10 +811,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 24. LockedTransactions // 21. LockedTransactions
func (*LockedTransactions) neoMsgCode() uint16 { func (*LockedTransactions) neoMsgCode() uint16 {
return 24 return 21
} }
func (p *LockedTransactions) neoMsgEncodedLen() int { func (p *LockedTransactions) neoMsgEncodedLen() int {
...@@ -958,10 +828,10 @@ func (p *LockedTransactions) neoMsgDecode(data []byte) (int, error) { ...@@ -958,10 +828,10 @@ func (p *LockedTransactions) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 25. AnswerLockedTransactions // 22. AnswerLockedTransactions
func (*AnswerLockedTransactions) neoMsgCode() uint16 { func (*AnswerLockedTransactions) neoMsgCode() uint16 {
return 25 return 22
} }
func (p *AnswerLockedTransactions) neoMsgEncodedLen() int { func (p *AnswerLockedTransactions) neoMsgEncodedLen() int {
...@@ -1012,10 +882,10 @@ overflow: ...@@ -1012,10 +882,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 26. FinalTID // 23. FinalTID
func (*FinalTID) neoMsgCode() uint16 { func (*FinalTID) neoMsgCode() uint16 {
return 26 return 23
} }
func (p *FinalTID) neoMsgEncodedLen() int { func (p *FinalTID) neoMsgEncodedLen() int {
...@@ -1037,10 +907,10 @@ overflow: ...@@ -1037,10 +907,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 27. AnswerFinalTID // 24. AnswerFinalTID
func (*AnswerFinalTID) neoMsgCode() uint16 { func (*AnswerFinalTID) neoMsgCode() uint16 {
return 27 return 24
} }
func (p *AnswerFinalTID) neoMsgEncodedLen() int { func (p *AnswerFinalTID) neoMsgEncodedLen() int {
...@@ -1062,10 +932,10 @@ overflow: ...@@ -1062,10 +932,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 28. ValidateTransaction // 25. ValidateTransaction
func (*ValidateTransaction) neoMsgCode() uint16 { func (*ValidateTransaction) neoMsgCode() uint16 {
return 28 return 25
} }
func (p *ValidateTransaction) neoMsgEncodedLen() int { func (p *ValidateTransaction) neoMsgEncodedLen() int {
...@@ -1089,10 +959,10 @@ overflow: ...@@ -1089,10 +959,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 29. BeginTransaction // 26. BeginTransaction
func (*BeginTransaction) neoMsgCode() uint16 { func (*BeginTransaction) neoMsgCode() uint16 {
return 29 return 26
} }
func (p *BeginTransaction) neoMsgEncodedLen() int { func (p *BeginTransaction) neoMsgEncodedLen() int {
...@@ -1114,10 +984,10 @@ overflow: ...@@ -1114,10 +984,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 30. AnswerBeginTransaction // 27. AnswerBeginTransaction
func (*AnswerBeginTransaction) neoMsgCode() uint16 { func (*AnswerBeginTransaction) neoMsgCode() uint16 {
return 30 return 27
} }
func (p *AnswerBeginTransaction) neoMsgEncodedLen() int { func (p *AnswerBeginTransaction) neoMsgEncodedLen() int {
...@@ -1139,10 +1009,10 @@ overflow: ...@@ -1139,10 +1009,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 31. FailedVote // 28. FailedVote
func (*FailedVote) neoMsgCode() uint16 { func (*FailedVote) neoMsgCode() uint16 {
return 31 return 28
} }
func (p *FailedVote) neoMsgEncodedLen() int { func (p *FailedVote) neoMsgEncodedLen() int {
...@@ -1189,10 +1059,10 @@ overflow: ...@@ -1189,10 +1059,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 32. FinishTransaction // 29. FinishTransaction
func (*FinishTransaction) neoMsgCode() uint16 { func (*FinishTransaction) neoMsgCode() uint16 {
return 32 return 29
} }
func (p *FinishTransaction) neoMsgEncodedLen() int { func (p *FinishTransaction) neoMsgEncodedLen() int {
...@@ -1263,10 +1133,10 @@ overflow: ...@@ -1263,10 +1133,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 33. AnswerFinishTransaction // 30. AnswerFinishTransaction
func (*AnswerFinishTransaction) neoMsgCode() uint16 { func (*AnswerFinishTransaction) neoMsgCode() uint16 {
return 33 return 30
} }
func (p *AnswerFinishTransaction) neoMsgEncodedLen() int { func (p *AnswerFinishTransaction) neoMsgEncodedLen() int {
...@@ -1290,10 +1160,10 @@ overflow: ...@@ -1290,10 +1160,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 34. NotifyTransactionFinished // 31. NotifyTransactionFinished
func (*NotifyTransactionFinished) neoMsgCode() uint16 { func (*NotifyTransactionFinished) neoMsgCode() uint16 {
return 34 return 31
} }
func (p *NotifyTransactionFinished) neoMsgEncodedLen() int { func (p *NotifyTransactionFinished) neoMsgEncodedLen() int {
...@@ -1317,10 +1187,10 @@ overflow: ...@@ -1317,10 +1187,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 35. LockInformation // 32. LockInformation
func (*LockInformation) neoMsgCode() uint16 { func (*LockInformation) neoMsgCode() uint16 {
return 35 return 32
} }
func (p *LockInformation) neoMsgEncodedLen() int { func (p *LockInformation) neoMsgEncodedLen() int {
...@@ -1344,10 +1214,10 @@ overflow: ...@@ -1344,10 +1214,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 36. AnswerLockInformation // 33. AnswerLockInformation
func (*AnswerLockInformation) neoMsgCode() uint16 { func (*AnswerLockInformation) neoMsgCode() uint16 {
return 36 return 33
} }
func (p *AnswerLockInformation) neoMsgEncodedLen() int { func (p *AnswerLockInformation) neoMsgEncodedLen() int {
...@@ -1369,10 +1239,10 @@ overflow: ...@@ -1369,10 +1239,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 37. InvalidateObjects // 34. InvalidateObjects
func (*InvalidateObjects) neoMsgCode() uint16 { func (*InvalidateObjects) neoMsgCode() uint16 {
return 37 return 34
} }
func (p *InvalidateObjects) neoMsgEncodedLen() int { func (p *InvalidateObjects) neoMsgEncodedLen() int {
...@@ -1419,10 +1289,10 @@ overflow: ...@@ -1419,10 +1289,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 38. UnlockInformation // 35. UnlockInformation
func (*UnlockInformation) neoMsgCode() uint16 { func (*UnlockInformation) neoMsgCode() uint16 {
return 38 return 35
} }
func (p *UnlockInformation) neoMsgEncodedLen() int { func (p *UnlockInformation) neoMsgEncodedLen() int {
...@@ -1444,10 +1314,10 @@ overflow: ...@@ -1444,10 +1314,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 39. GenerateOIDs // 36. GenerateOIDs
func (*GenerateOIDs) neoMsgCode() uint16 { func (*GenerateOIDs) neoMsgCode() uint16 {
return 39 return 36
} }
func (p *GenerateOIDs) neoMsgEncodedLen() int { func (p *GenerateOIDs) neoMsgEncodedLen() int {
...@@ -1469,10 +1339,10 @@ overflow: ...@@ -1469,10 +1339,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 40. AnswerGenerateOIDs // 37. AnswerGenerateOIDs
func (*AnswerGenerateOIDs) neoMsgCode() uint16 { func (*AnswerGenerateOIDs) neoMsgCode() uint16 {
return 40 return 37
} }
func (p *AnswerGenerateOIDs) neoMsgEncodedLen() int { func (p *AnswerGenerateOIDs) neoMsgEncodedLen() int {
...@@ -1517,10 +1387,10 @@ overflow: ...@@ -1517,10 +1387,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 41. Deadlock // 38. Deadlock
func (*Deadlock) neoMsgCode() uint16 { func (*Deadlock) neoMsgCode() uint16 {
return 41 return 38
} }
func (p *Deadlock) neoMsgEncodedLen() int { func (p *Deadlock) neoMsgEncodedLen() int {
...@@ -1544,10 +1414,10 @@ overflow: ...@@ -1544,10 +1414,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 42. RebaseTransaction // 39. RebaseTransaction
func (*RebaseTransaction) neoMsgCode() uint16 { func (*RebaseTransaction) neoMsgCode() uint16 {
return 42 return 39
} }
func (p *RebaseTransaction) neoMsgEncodedLen() int { func (p *RebaseTransaction) neoMsgEncodedLen() int {
...@@ -1571,10 +1441,10 @@ overflow: ...@@ -1571,10 +1441,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 43. AnswerRebaseTransaction // 40. AnswerRebaseTransaction
func (*AnswerRebaseTransaction) neoMsgCode() uint16 { func (*AnswerRebaseTransaction) neoMsgCode() uint16 {
return 43 return 40
} }
func (p *AnswerRebaseTransaction) neoMsgEncodedLen() int { func (p *AnswerRebaseTransaction) neoMsgEncodedLen() int {
...@@ -1619,10 +1489,10 @@ overflow: ...@@ -1619,10 +1489,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 44. RebaseObject // 41. RebaseObject
func (*RebaseObject) neoMsgCode() uint16 { func (*RebaseObject) neoMsgCode() uint16 {
return 44 return 41
} }
func (p *RebaseObject) neoMsgEncodedLen() int { func (p *RebaseObject) neoMsgEncodedLen() int {
...@@ -1646,10 +1516,10 @@ overflow: ...@@ -1646,10 +1516,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 45. AnswerRebaseObject // 42. AnswerRebaseObject
func (*AnswerRebaseObject) neoMsgCode() uint16 { func (*AnswerRebaseObject) neoMsgCode() uint16 {
return 45 return 42
} }
func (p *AnswerRebaseObject) neoMsgEncodedLen() int { func (p *AnswerRebaseObject) neoMsgEncodedLen() int {
...@@ -1696,10 +1566,10 @@ overflow: ...@@ -1696,10 +1566,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 46. StoreObject // 43. StoreObject
func (*StoreObject) neoMsgCode() uint16 { func (*StoreObject) neoMsgCode() uint16 {
return 46 return 43
} }
func (p *StoreObject) neoMsgEncodedLen() int { func (p *StoreObject) neoMsgEncodedLen() int {
...@@ -1750,10 +1620,10 @@ overflow: ...@@ -1750,10 +1620,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 47. AnswerStoreObject // 44. AnswerStoreObject
func (*AnswerStoreObject) neoMsgCode() uint16 { func (*AnswerStoreObject) neoMsgCode() uint16 {
return 47 return 44
} }
func (p *AnswerStoreObject) neoMsgEncodedLen() int { func (p *AnswerStoreObject) neoMsgEncodedLen() int {
...@@ -1775,10 +1645,10 @@ overflow: ...@@ -1775,10 +1645,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 48. AbortTransaction // 45. AbortTransaction
func (*AbortTransaction) neoMsgCode() uint16 { func (*AbortTransaction) neoMsgCode() uint16 {
return 48 return 45
} }
func (p *AbortTransaction) neoMsgEncodedLen() int { func (p *AbortTransaction) neoMsgEncodedLen() int {
...@@ -1825,10 +1695,10 @@ overflow: ...@@ -1825,10 +1695,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 49. StoreTransaction // 46. StoreTransaction
func (*StoreTransaction) neoMsgCode() uint16 { func (*StoreTransaction) neoMsgCode() uint16 {
return 49 return 46
} }
func (p *StoreTransaction) neoMsgEncodedLen() int { func (p *StoreTransaction) neoMsgEncodedLen() int {
...@@ -1926,10 +1796,10 @@ overflow: ...@@ -1926,10 +1796,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 50. VoteTransaction // 47. VoteTransaction
func (*VoteTransaction) neoMsgCode() uint16 { func (*VoteTransaction) neoMsgCode() uint16 {
return 50 return 47
} }
func (p *VoteTransaction) neoMsgEncodedLen() int { func (p *VoteTransaction) neoMsgEncodedLen() int {
...@@ -1951,10 +1821,10 @@ overflow: ...@@ -1951,10 +1821,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 51. GetObject // 48. GetObject
func (*GetObject) neoMsgCode() uint16 { func (*GetObject) neoMsgCode() uint16 {
return 51 return 48
} }
func (p *GetObject) neoMsgEncodedLen() int { func (p *GetObject) neoMsgEncodedLen() int {
...@@ -1980,10 +1850,10 @@ overflow: ...@@ -1980,10 +1850,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 52. AnswerGetObject // 49. AnswerGetObject
func (*AnswerGetObject) neoMsgCode() uint16 { func (*AnswerGetObject) neoMsgCode() uint16 {
return 52 return 49
} }
func (p *AnswerGetObject) neoMsgEncodedLen() int { func (p *AnswerGetObject) neoMsgEncodedLen() int {
...@@ -2034,10 +1904,10 @@ overflow: ...@@ -2034,10 +1904,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 53. TIDList // 50. TIDList
func (*TIDList) neoMsgCode() uint16 { func (*TIDList) neoMsgCode() uint16 {
return 53 return 50
} }
func (p *TIDList) neoMsgEncodedLen() int { func (p *TIDList) neoMsgEncodedLen() int {
...@@ -2063,10 +1933,10 @@ overflow: ...@@ -2063,10 +1933,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 54. AnswerTIDList // 51. AnswerTIDList
func (*AnswerTIDList) neoMsgCode() uint16 { func (*AnswerTIDList) neoMsgCode() uint16 {
return 54 return 51
} }
func (p *AnswerTIDList) neoMsgEncodedLen() int { func (p *AnswerTIDList) neoMsgEncodedLen() int {
...@@ -2111,10 +1981,10 @@ overflow: ...@@ -2111,10 +1981,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 55. TIDListFrom // 52. TIDListFrom
func (*TIDListFrom) neoMsgCode() uint16 { func (*TIDListFrom) neoMsgCode() uint16 {
return 55 return 52
} }
func (p *TIDListFrom) neoMsgEncodedLen() int { func (p *TIDListFrom) neoMsgEncodedLen() int {
...@@ -2142,10 +2012,10 @@ overflow: ...@@ -2142,10 +2012,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 56. AnswerTIDListFrom // 53. AnswerTIDListFrom
func (*AnswerTIDListFrom) neoMsgCode() uint16 { func (*AnswerTIDListFrom) neoMsgCode() uint16 {
return 56 return 53
} }
func (p *AnswerTIDListFrom) neoMsgEncodedLen() int { func (p *AnswerTIDListFrom) neoMsgEncodedLen() int {
...@@ -2190,10 +2060,10 @@ overflow: ...@@ -2190,10 +2060,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 57. TransactionInformation // 54. TransactionInformation
func (*TransactionInformation) neoMsgCode() uint16 { func (*TransactionInformation) neoMsgCode() uint16 {
return 57 return 54
} }
func (p *TransactionInformation) neoMsgEncodedLen() int { func (p *TransactionInformation) neoMsgEncodedLen() int {
...@@ -2215,10 +2085,10 @@ overflow: ...@@ -2215,10 +2085,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 58. AnswerTransactionInformation // 55. AnswerTransactionInformation
func (*AnswerTransactionInformation) neoMsgCode() uint16 { func (*AnswerTransactionInformation) neoMsgCode() uint16 {
return 58 return 55
} }
func (p *AnswerTransactionInformation) neoMsgEncodedLen() int { func (p *AnswerTransactionInformation) neoMsgEncodedLen() int {
...@@ -2318,10 +2188,10 @@ overflow: ...@@ -2318,10 +2188,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 59. ObjectHistory // 56. ObjectHistory
func (*ObjectHistory) neoMsgCode() uint16 { func (*ObjectHistory) neoMsgCode() uint16 {
return 59 return 56
} }
func (p *ObjectHistory) neoMsgEncodedLen() int { func (p *ObjectHistory) neoMsgEncodedLen() int {
...@@ -2347,10 +2217,10 @@ overflow: ...@@ -2347,10 +2217,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 60. AnswerObjectHistory // 57. AnswerObjectHistory
func (*AnswerObjectHistory) neoMsgCode() uint16 { func (*AnswerObjectHistory) neoMsgCode() uint16 {
return 60 return 57
} }
func (p *AnswerObjectHistory) neoMsgEncodedLen() int { func (p *AnswerObjectHistory) neoMsgEncodedLen() int {
...@@ -2402,10 +2272,10 @@ overflow: ...@@ -2402,10 +2272,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 61. PartitionList // 58. PartitionList
func (*PartitionList) neoMsgCode() uint16 { func (*PartitionList) neoMsgCode() uint16 {
return 61 return 58
} }
func (p *PartitionList) neoMsgEncodedLen() int { func (p *PartitionList) neoMsgEncodedLen() int {
...@@ -2431,10 +2301,10 @@ overflow: ...@@ -2431,10 +2301,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 62. AnswerPartitionList // 59. AnswerPartitionList
func (*AnswerPartitionList) neoMsgCode() uint16 { func (*AnswerPartitionList) neoMsgCode() uint16 {
return 62 return 59
} }
func (p *AnswerPartitionList) neoMsgEncodedLen() int { func (p *AnswerPartitionList) neoMsgEncodedLen() int {
...@@ -2511,10 +2381,10 @@ overflow: ...@@ -2511,10 +2381,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 63. NodeList // 60. NodeList
func (*NodeList) neoMsgCode() uint16 { func (*NodeList) neoMsgCode() uint16 {
return 63 return 60
} }
func (p *NodeList) neoMsgEncodedLen() int { func (p *NodeList) neoMsgEncodedLen() int {
...@@ -2536,10 +2406,10 @@ overflow: ...@@ -2536,10 +2406,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 64. AnswerNodeList // 61. AnswerNodeList
func (*AnswerNodeList) neoMsgCode() uint16 { func (*AnswerNodeList) neoMsgCode() uint16 {
return 64 return 61
} }
func (p *AnswerNodeList) neoMsgEncodedLen() int { func (p *AnswerNodeList) neoMsgEncodedLen() int {
...@@ -2614,10 +2484,10 @@ overflow: ...@@ -2614,10 +2484,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 65. SetNodeState // 62. SetNodeState
func (*SetNodeState) neoMsgCode() uint16 { func (*SetNodeState) neoMsgCode() uint16 {
return 65 return 62
} }
func (p *SetNodeState) neoMsgEncodedLen() int { func (p *SetNodeState) neoMsgEncodedLen() int {
...@@ -2641,10 +2511,10 @@ overflow: ...@@ -2641,10 +2511,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 66. AddPendingNodes // 63. AddPendingNodes
func (*AddPendingNodes) neoMsgCode() uint16 { func (*AddPendingNodes) neoMsgCode() uint16 {
return 66 return 63
} }
func (p *AddPendingNodes) neoMsgEncodedLen() int { func (p *AddPendingNodes) neoMsgEncodedLen() int {
...@@ -2689,10 +2559,10 @@ overflow: ...@@ -2689,10 +2559,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 67. TweakPartitionTable // 64. TweakPartitionTable
func (*TweakPartitionTable) neoMsgCode() uint16 { func (*TweakPartitionTable) neoMsgCode() uint16 {
return 67 return 64
} }
func (p *TweakPartitionTable) neoMsgEncodedLen() int { func (p *TweakPartitionTable) neoMsgEncodedLen() int {
...@@ -2737,10 +2607,10 @@ overflow: ...@@ -2737,10 +2607,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 68. NotifyNodeInformation // 65. NotifyNodeInformation
func (*NotifyNodeInformation) neoMsgCode() uint16 { func (*NotifyNodeInformation) neoMsgCode() uint16 {
return 68 return 65
} }
func (p *NotifyNodeInformation) neoMsgEncodedLen() int { func (p *NotifyNodeInformation) neoMsgEncodedLen() int {
...@@ -2817,10 +2687,10 @@ overflow: ...@@ -2817,10 +2687,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 69. NodeInformation // 66. NodeInformation
func (*NodeInformation) neoMsgCode() uint16 { func (*NodeInformation) neoMsgCode() uint16 {
return 69 return 66
} }
func (p *NodeInformation) neoMsgEncodedLen() int { func (p *NodeInformation) neoMsgEncodedLen() int {
...@@ -2834,10 +2704,10 @@ func (p *NodeInformation) neoMsgDecode(data []byte) (int, error) { ...@@ -2834,10 +2704,10 @@ func (p *NodeInformation) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 70. SetClusterState // 67. SetClusterState
func (*SetClusterState) neoMsgCode() uint16 { func (*SetClusterState) neoMsgCode() uint16 {
return 70 return 67
} }
func (p *SetClusterState) neoMsgEncodedLen() int { func (p *SetClusterState) neoMsgEncodedLen() int {
...@@ -2859,10 +2729,10 @@ overflow: ...@@ -2859,10 +2729,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 71. repairFlags // 68. repairFlags
func (*repairFlags) neoMsgCode() uint16 { func (*repairFlags) neoMsgCode() uint16 {
return 71 return 68
} }
func (p *repairFlags) neoMsgEncodedLen() int { func (p *repairFlags) neoMsgEncodedLen() int {
...@@ -2884,10 +2754,10 @@ overflow: ...@@ -2884,10 +2754,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 72. Repair // 69. Repair
func (*Repair) neoMsgCode() uint16 { func (*Repair) neoMsgCode() uint16 {
return 72 return 69
} }
func (p *Repair) neoMsgEncodedLen() int { func (p *Repair) neoMsgEncodedLen() int {
...@@ -2934,10 +2804,10 @@ overflow: ...@@ -2934,10 +2804,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 73. RepairOne // 70. RepairOne
func (*RepairOne) neoMsgCode() uint16 { func (*RepairOne) neoMsgCode() uint16 {
return 73 return 70
} }
func (p *RepairOne) neoMsgEncodedLen() int { func (p *RepairOne) neoMsgEncodedLen() int {
...@@ -2959,10 +2829,10 @@ overflow: ...@@ -2959,10 +2829,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 74. NotifyClusterState // 71. NotifyClusterState
func (*NotifyClusterState) neoMsgCode() uint16 { func (*NotifyClusterState) neoMsgCode() uint16 {
return 74 return 71
} }
func (p *NotifyClusterState) neoMsgEncodedLen() int { func (p *NotifyClusterState) neoMsgEncodedLen() int {
...@@ -2984,10 +2854,10 @@ overflow: ...@@ -2984,10 +2854,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 75. AskClusterState // 72. AskClusterState
func (*AskClusterState) neoMsgCode() uint16 { func (*AskClusterState) neoMsgCode() uint16 {
return 75 return 72
} }
func (p *AskClusterState) neoMsgEncodedLen() int { func (p *AskClusterState) neoMsgEncodedLen() int {
...@@ -3001,10 +2871,10 @@ func (p *AskClusterState) neoMsgDecode(data []byte) (int, error) { ...@@ -3001,10 +2871,10 @@ func (p *AskClusterState) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 76. AnswerClusterState // 73. AnswerClusterState
func (*AnswerClusterState) neoMsgCode() uint16 { func (*AnswerClusterState) neoMsgCode() uint16 {
return 76 return 73
} }
func (p *AnswerClusterState) neoMsgEncodedLen() int { func (p *AnswerClusterState) neoMsgEncodedLen() int {
...@@ -3026,10 +2896,10 @@ overflow: ...@@ -3026,10 +2896,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 77. ObjectUndoSerial // 74. ObjectUndoSerial
func (*ObjectUndoSerial) neoMsgCode() uint16 { func (*ObjectUndoSerial) neoMsgCode() uint16 {
return 77 return 74
} }
func (p *ObjectUndoSerial) neoMsgEncodedLen() int { func (p *ObjectUndoSerial) neoMsgEncodedLen() int {
...@@ -3080,10 +2950,10 @@ overflow: ...@@ -3080,10 +2950,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 78. AnswerObjectUndoSerial // 75. AnswerObjectUndoSerial
func (*AnswerObjectUndoSerial) neoMsgCode() uint16 { func (*AnswerObjectUndoSerial) neoMsgCode() uint16 {
return 78 return 75
} }
func (p *AnswerObjectUndoSerial) neoMsgEncodedLen() int { func (p *AnswerObjectUndoSerial) neoMsgEncodedLen() int {
...@@ -3148,10 +3018,10 @@ overflow: ...@@ -3148,10 +3018,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 79. CheckCurrentSerial // 76. CheckCurrentSerial
func (*CheckCurrentSerial) neoMsgCode() uint16 { func (*CheckCurrentSerial) neoMsgCode() uint16 {
return 79 return 76
} }
func (p *CheckCurrentSerial) neoMsgEncodedLen() int { func (p *CheckCurrentSerial) neoMsgEncodedLen() int {
...@@ -3177,10 +3047,10 @@ overflow: ...@@ -3177,10 +3047,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 80. Pack // 77. Pack
func (*Pack) neoMsgCode() uint16 { func (*Pack) neoMsgCode() uint16 {
return 80 return 77
} }
func (p *Pack) neoMsgEncodedLen() int { func (p *Pack) neoMsgEncodedLen() int {
...@@ -3202,10 +3072,10 @@ overflow: ...@@ -3202,10 +3072,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 81. AnswerPack // 78. AnswerPack
func (*AnswerPack) neoMsgCode() uint16 { func (*AnswerPack) neoMsgCode() uint16 {
return 81 return 78
} }
func (p *AnswerPack) neoMsgEncodedLen() int { func (p *AnswerPack) neoMsgEncodedLen() int {
...@@ -3227,10 +3097,10 @@ overflow: ...@@ -3227,10 +3097,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 82. CheckReplicas // 79. CheckReplicas
func (*CheckReplicas) neoMsgCode() uint16 { func (*CheckReplicas) neoMsgCode() uint16 {
return 82 return 79
} }
func (p *CheckReplicas) neoMsgEncodedLen() int { func (p *CheckReplicas) neoMsgEncodedLen() int {
...@@ -3285,10 +3155,10 @@ overflow: ...@@ -3285,10 +3155,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 83. CheckPartition // 80. CheckPartition
func (*CheckPartition) neoMsgCode() uint16 { func (*CheckPartition) neoMsgCode() uint16 {
return 83 return 80
} }
func (p *CheckPartition) neoMsgEncodedLen() int { func (p *CheckPartition) neoMsgEncodedLen() int {
...@@ -3351,10 +3221,10 @@ overflow: ...@@ -3351,10 +3221,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 84. CheckTIDRange // 81. CheckTIDRange
func (*CheckTIDRange) neoMsgCode() uint16 { func (*CheckTIDRange) neoMsgCode() uint16 {
return 84 return 81
} }
func (p *CheckTIDRange) neoMsgEncodedLen() int { func (p *CheckTIDRange) neoMsgEncodedLen() int {
...@@ -3382,10 +3252,10 @@ overflow: ...@@ -3382,10 +3252,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 85. AnswerCheckTIDRange // 82. AnswerCheckTIDRange
func (*AnswerCheckTIDRange) neoMsgCode() uint16 { func (*AnswerCheckTIDRange) neoMsgCode() uint16 {
return 85 return 82
} }
func (p *AnswerCheckTIDRange) neoMsgEncodedLen() int { func (p *AnswerCheckTIDRange) neoMsgEncodedLen() int {
...@@ -3411,10 +3281,10 @@ overflow: ...@@ -3411,10 +3281,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 86. CheckSerialRange // 83. CheckSerialRange
func (*CheckSerialRange) neoMsgCode() uint16 { func (*CheckSerialRange) neoMsgCode() uint16 {
return 86 return 83
} }
func (p *CheckSerialRange) neoMsgEncodedLen() int { func (p *CheckSerialRange) neoMsgEncodedLen() int {
...@@ -3444,10 +3314,10 @@ overflow: ...@@ -3444,10 +3314,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 87. AnswerCheckSerialRange // 84. AnswerCheckSerialRange
func (*AnswerCheckSerialRange) neoMsgCode() uint16 { func (*AnswerCheckSerialRange) neoMsgCode() uint16 {
return 87 return 84
} }
func (p *AnswerCheckSerialRange) neoMsgEncodedLen() int { func (p *AnswerCheckSerialRange) neoMsgEncodedLen() int {
...@@ -3477,10 +3347,10 @@ overflow: ...@@ -3477,10 +3347,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 88. PartitionCorrupted // 85. PartitionCorrupted
func (*PartitionCorrupted) neoMsgCode() uint16 { func (*PartitionCorrupted) neoMsgCode() uint16 {
return 88 return 85
} }
func (p *PartitionCorrupted) neoMsgEncodedLen() int { func (p *PartitionCorrupted) neoMsgEncodedLen() int {
...@@ -3527,10 +3397,10 @@ overflow: ...@@ -3527,10 +3397,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 89. LastTransaction // 86. LastTransaction
func (*LastTransaction) neoMsgCode() uint16 { func (*LastTransaction) neoMsgCode() uint16 {
return 89 return 86
} }
func (p *LastTransaction) neoMsgEncodedLen() int { func (p *LastTransaction) neoMsgEncodedLen() int {
...@@ -3544,10 +3414,10 @@ func (p *LastTransaction) neoMsgDecode(data []byte) (int, error) { ...@@ -3544,10 +3414,10 @@ func (p *LastTransaction) neoMsgDecode(data []byte) (int, error) {
return 0, nil return 0, nil
} }
// 90. AnswerLastTransaction // 87. AnswerLastTransaction
func (*AnswerLastTransaction) neoMsgCode() uint16 { func (*AnswerLastTransaction) neoMsgCode() uint16 {
return 90 return 87
} }
func (p *AnswerLastTransaction) neoMsgEncodedLen() int { func (p *AnswerLastTransaction) neoMsgEncodedLen() int {
...@@ -3569,10 +3439,10 @@ overflow: ...@@ -3569,10 +3439,10 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 91. NotifyReady // 88. NotifyReady
func (*NotifyReady) neoMsgCode() uint16 { func (*NotifyReady) neoMsgCode() uint16 {
return 91 return 88
} }
func (p *NotifyReady) neoMsgEncodedLen() int { func (p *NotifyReady) neoMsgEncodedLen() int {
...@@ -3589,95 +3459,92 @@ func (p *NotifyReady) neoMsgDecode(data []byte) (int, error) { ...@@ -3589,95 +3459,92 @@ func (p *NotifyReady) neoMsgDecode(data []byte) (int, error) {
// registry of message types // registry of message types
var msgTypeRegistry = map[uint16]reflect.Type{ var msgTypeRegistry = map[uint16]reflect.Type{
0: reflect.TypeOf(Address{}), 0: reflect.TypeOf(Address{}),
1: reflect.TypeOf(NodeInfo{}), 1: reflect.TypeOf(Error{}),
2: reflect.TypeOf(CellInfo{}), 2: reflect.TypeOf(Ping{}),
3: reflect.TypeOf(RowInfo{}), 3: reflect.TypeOf(CloseClient{}),
4: reflect.TypeOf(Error{}), 4: reflect.TypeOf(RequestIdentification{}),
5: reflect.TypeOf(Ping{}), 5: reflect.TypeOf(AcceptIdentification{}),
6: reflect.TypeOf(CloseClient{}), 6: reflect.TypeOf(PrimaryMaster{}),
7: reflect.TypeOf(RequestIdentification{}), 7: reflect.TypeOf(AnswerPrimary{}),
8: reflect.TypeOf(AcceptIdentification{}), 8: reflect.TypeOf(NotPrimaryMaster{}),
9: reflect.TypeOf(PrimaryMaster{}), 9: reflect.TypeOf(Recovery{}),
10: reflect.TypeOf(AnswerPrimary{}), 10: reflect.TypeOf(AnswerRecovery{}),
11: reflect.TypeOf(NotPrimaryMaster{}), 11: reflect.TypeOf(LastIDs{}),
12: reflect.TypeOf(Recovery{}), 12: reflect.TypeOf(AnswerLastIDs{}),
13: reflect.TypeOf(AnswerRecovery{}), 13: reflect.TypeOf(AskPartitionTable{}),
14: reflect.TypeOf(LastIDs{}), 14: reflect.TypeOf(AnswerPartitionTable{}),
15: reflect.TypeOf(AnswerLastIDs{}), 15: reflect.TypeOf(NotifyPartitionTable{}),
16: reflect.TypeOf(AskPartitionTable{}), 16: reflect.TypeOf(NotifyPartitionChanges{}),
17: reflect.TypeOf(AnswerPartitionTable{}), 17: reflect.TypeOf(StartOperation{}),
18: reflect.TypeOf(NotifyPartitionTable{}), 18: reflect.TypeOf(StopOperation{}),
19: reflect.TypeOf(NotifyPartitionChanges{}), 19: reflect.TypeOf(UnfinishedTransactions{}),
20: reflect.TypeOf(StartOperation{}), 20: reflect.TypeOf(AnswerUnfinishedTransactions{}),
21: reflect.TypeOf(StopOperation{}), 21: reflect.TypeOf(LockedTransactions{}),
22: reflect.TypeOf(UnfinishedTransactions{}), 22: reflect.TypeOf(AnswerLockedTransactions{}),
23: reflect.TypeOf(AnswerUnfinishedTransactions{}), 23: reflect.TypeOf(FinalTID{}),
24: reflect.TypeOf(LockedTransactions{}), 24: reflect.TypeOf(AnswerFinalTID{}),
25: reflect.TypeOf(AnswerLockedTransactions{}), 25: reflect.TypeOf(ValidateTransaction{}),
26: reflect.TypeOf(FinalTID{}), 26: reflect.TypeOf(BeginTransaction{}),
27: reflect.TypeOf(AnswerFinalTID{}), 27: reflect.TypeOf(AnswerBeginTransaction{}),
28: reflect.TypeOf(ValidateTransaction{}), 28: reflect.TypeOf(FailedVote{}),
29: reflect.TypeOf(BeginTransaction{}), 29: reflect.TypeOf(FinishTransaction{}),
30: reflect.TypeOf(AnswerBeginTransaction{}), 30: reflect.TypeOf(AnswerFinishTransaction{}),
31: reflect.TypeOf(FailedVote{}), 31: reflect.TypeOf(NotifyTransactionFinished{}),
32: reflect.TypeOf(FinishTransaction{}), 32: reflect.TypeOf(LockInformation{}),
33: reflect.TypeOf(AnswerFinishTransaction{}), 33: reflect.TypeOf(AnswerLockInformation{}),
34: reflect.TypeOf(NotifyTransactionFinished{}), 34: reflect.TypeOf(InvalidateObjects{}),
35: reflect.TypeOf(LockInformation{}), 35: reflect.TypeOf(UnlockInformation{}),
36: reflect.TypeOf(AnswerLockInformation{}), 36: reflect.TypeOf(GenerateOIDs{}),
37: reflect.TypeOf(InvalidateObjects{}), 37: reflect.TypeOf(AnswerGenerateOIDs{}),
38: reflect.TypeOf(UnlockInformation{}), 38: reflect.TypeOf(Deadlock{}),
39: reflect.TypeOf(GenerateOIDs{}), 39: reflect.TypeOf(RebaseTransaction{}),
40: reflect.TypeOf(AnswerGenerateOIDs{}), 40: reflect.TypeOf(AnswerRebaseTransaction{}),
41: reflect.TypeOf(Deadlock{}), 41: reflect.TypeOf(RebaseObject{}),
42: reflect.TypeOf(RebaseTransaction{}), 42: reflect.TypeOf(AnswerRebaseObject{}),
43: reflect.TypeOf(AnswerRebaseTransaction{}), 43: reflect.TypeOf(StoreObject{}),
44: reflect.TypeOf(RebaseObject{}), 44: reflect.TypeOf(AnswerStoreObject{}),
45: reflect.TypeOf(AnswerRebaseObject{}), 45: reflect.TypeOf(AbortTransaction{}),
46: reflect.TypeOf(StoreObject{}), 46: reflect.TypeOf(StoreTransaction{}),
47: reflect.TypeOf(AnswerStoreObject{}), 47: reflect.TypeOf(VoteTransaction{}),
48: reflect.TypeOf(AbortTransaction{}), 48: reflect.TypeOf(GetObject{}),
49: reflect.TypeOf(StoreTransaction{}), 49: reflect.TypeOf(AnswerGetObject{}),
50: reflect.TypeOf(VoteTransaction{}), 50: reflect.TypeOf(TIDList{}),
51: reflect.TypeOf(GetObject{}), 51: reflect.TypeOf(AnswerTIDList{}),
52: reflect.TypeOf(AnswerGetObject{}), 52: reflect.TypeOf(TIDListFrom{}),
53: reflect.TypeOf(TIDList{}), 53: reflect.TypeOf(AnswerTIDListFrom{}),
54: reflect.TypeOf(AnswerTIDList{}), 54: reflect.TypeOf(TransactionInformation{}),
55: reflect.TypeOf(TIDListFrom{}), 55: reflect.TypeOf(AnswerTransactionInformation{}),
56: reflect.TypeOf(AnswerTIDListFrom{}), 56: reflect.TypeOf(ObjectHistory{}),
57: reflect.TypeOf(TransactionInformation{}), 57: reflect.TypeOf(AnswerObjectHistory{}),
58: reflect.TypeOf(AnswerTransactionInformation{}), 58: reflect.TypeOf(PartitionList{}),
59: reflect.TypeOf(ObjectHistory{}), 59: reflect.TypeOf(AnswerPartitionList{}),
60: reflect.TypeOf(AnswerObjectHistory{}), 60: reflect.TypeOf(NodeList{}),
61: reflect.TypeOf(PartitionList{}), 61: reflect.TypeOf(AnswerNodeList{}),
62: reflect.TypeOf(AnswerPartitionList{}), 62: reflect.TypeOf(SetNodeState{}),
63: reflect.TypeOf(NodeList{}), 63: reflect.TypeOf(AddPendingNodes{}),
64: reflect.TypeOf(AnswerNodeList{}), 64: reflect.TypeOf(TweakPartitionTable{}),
65: reflect.TypeOf(SetNodeState{}), 65: reflect.TypeOf(NotifyNodeInformation{}),
66: reflect.TypeOf(AddPendingNodes{}), 66: reflect.TypeOf(NodeInformation{}),
67: reflect.TypeOf(TweakPartitionTable{}), 67: reflect.TypeOf(SetClusterState{}),
68: reflect.TypeOf(NotifyNodeInformation{}), 68: reflect.TypeOf(repairFlags{}),
69: reflect.TypeOf(NodeInformation{}), 69: reflect.TypeOf(Repair{}),
70: reflect.TypeOf(SetClusterState{}), 70: reflect.TypeOf(RepairOne{}),
71: reflect.TypeOf(repairFlags{}), 71: reflect.TypeOf(NotifyClusterState{}),
72: reflect.TypeOf(Repair{}), 72: reflect.TypeOf(AskClusterState{}),
73: reflect.TypeOf(RepairOne{}), 73: reflect.TypeOf(AnswerClusterState{}),
74: reflect.TypeOf(NotifyClusterState{}), 74: reflect.TypeOf(ObjectUndoSerial{}),
75: reflect.TypeOf(AskClusterState{}), 75: reflect.TypeOf(AnswerObjectUndoSerial{}),
76: reflect.TypeOf(AnswerClusterState{}), 76: reflect.TypeOf(CheckCurrentSerial{}),
77: reflect.TypeOf(ObjectUndoSerial{}), 77: reflect.TypeOf(Pack{}),
78: reflect.TypeOf(AnswerObjectUndoSerial{}), 78: reflect.TypeOf(AnswerPack{}),
79: reflect.TypeOf(CheckCurrentSerial{}), 79: reflect.TypeOf(CheckReplicas{}),
80: reflect.TypeOf(Pack{}), 80: reflect.TypeOf(CheckPartition{}),
81: reflect.TypeOf(AnswerPack{}), 81: reflect.TypeOf(CheckTIDRange{}),
82: reflect.TypeOf(CheckReplicas{}), 82: reflect.TypeOf(AnswerCheckTIDRange{}),
83: reflect.TypeOf(CheckPartition{}), 83: reflect.TypeOf(CheckSerialRange{}),
84: reflect.TypeOf(CheckTIDRange{}), 84: reflect.TypeOf(AnswerCheckSerialRange{}),
85: reflect.TypeOf(AnswerCheckTIDRange{}), 85: reflect.TypeOf(PartitionCorrupted{}),
86: reflect.TypeOf(CheckSerialRange{}), 86: reflect.TypeOf(LastTransaction{}),
87: reflect.TypeOf(AnswerCheckSerialRange{}), 87: reflect.TypeOf(AnswerLastTransaction{}),
88: reflect.TypeOf(PartitionCorrupted{}), 88: reflect.TypeOf(NotifyReady{}),
89: reflect.TypeOf(LastTransaction{}),
90: reflect.TypeOf(AnswerLastTransaction{}),
91: reflect.TypeOf(NotifyReady{}),
} }
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