Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
69d5916b
Commit
69d5916b
authored
Aug 02, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
daff41d2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
403 additions
and
403 deletions
+403
-403
go/neo/connection.go
go/neo/connection.go
+6
-6
go/neo/proto.go
go/neo/proto.go
+11
-11
go/neo/proto_test.go
go/neo/proto_test.go
+8
-8
go/neo/protogen.go
go/neo/protogen.go
+10
-10
go/neo/zproto-marshal.go
go/neo/zproto-marshal.go
+368
-368
No files found.
go/neo/connection.go
View file @
69d5916b
...
@@ -784,7 +784,7 @@ func (c *Conn) Recv() (Msg, error) {
...
@@ -784,7 +784,7 @@ func (c *Conn) Recv() (Msg, error) {
// TODO use free-list for decoded messages + when possible decode in-place
// TODO use free-list for decoded messages + when possible decode in-place
msg
:=
reflect
.
New
(
msgType
)
.
Interface
()
.
(
Msg
)
msg
:=
reflect
.
New
(
msgType
)
.
Interface
()
.
(
Msg
)
_
,
err
=
msg
.
NEO
MsgDecode
(
pkt
.
Payload
())
_
,
err
=
msg
.
neo
MsgDecode
(
pkt
.
Payload
())
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
&
ConnError
{
Conn
:
c
,
Op
:
"decode"
,
Err
:
err
}
return
nil
,
&
ConnError
{
Conn
:
c
,
Op
:
"decode"
,
Err
:
err
}
}
}
...
@@ -798,15 +798,15 @@ func (c *Conn) Recv() (Msg, error) {
...
@@ -798,15 +798,15 @@ func (c *Conn) Recv() (Msg, error) {
func
(
c
*
Conn
)
Send
(
msg
Msg
)
error
{
func
(
c
*
Conn
)
Send
(
msg
Msg
)
error
{
traceConnSendPre
(
c
,
msg
)
traceConnSendPre
(
c
,
msg
)
l
:=
msg
.
NEO
MsgEncodedLen
()
l
:=
msg
.
neo
MsgEncodedLen
()
buf
:=
PktBuf
{
make
([]
byte
,
PktHeadLen
+
l
)}
// TODO -> freelist
buf
:=
PktBuf
{
make
([]
byte
,
PktHeadLen
+
l
)}
// TODO -> freelist
h
:=
buf
.
Header
()
h
:=
buf
.
Header
()
// h.ConnId will be set by conn.Send
// h.ConnId will be set by conn.Send
h
.
MsgCode
=
hton16
(
msg
.
NEO
MsgCode
())
h
.
MsgCode
=
hton16
(
msg
.
neo
MsgCode
())
h
.
MsgLen
=
hton32
(
uint32
(
l
))
// XXX casting: think again
h
.
MsgLen
=
hton32
(
uint32
(
l
))
// XXX casting: think again
msg
.
NEO
MsgEncode
(
buf
.
Payload
())
msg
.
neo
MsgEncode
(
buf
.
Payload
())
// XXX why pointer?
// XXX why pointer?
// XXX more context in err? (msg type)
// XXX more context in err? (msg type)
...
@@ -832,8 +832,8 @@ func (c *Conn) Expect(msgv ...Msg) (which int, err error) {
...
@@ -832,8 +832,8 @@ func (c *Conn) Expect(msgv ...Msg) (which int, err error) {
msgCode
:=
ntoh16
(
pkth
.
MsgCode
)
msgCode
:=
ntoh16
(
pkth
.
MsgCode
)
for
i
,
msg
:=
range
msgv
{
for
i
,
msg
:=
range
msgv
{
if
msg
.
NEO
MsgCode
()
==
msgCode
{
if
msg
.
neo
MsgCode
()
==
msgCode
{
_
,
err
=
msg
.
NEO
MsgDecode
(
pkt
.
Payload
())
_
,
err
=
msg
.
neo
MsgDecode
(
pkt
.
Payload
())
if
err
!=
nil
{
if
err
!=
nil
{
return
-
1
,
&
ConnError
{
Conn
:
c
,
Op
:
"decode"
,
Err
:
err
}
return
-
1
,
&
ConnError
{
Conn
:
c
,
Op
:
"decode"
,
Err
:
err
}
}
}
...
...
go/neo/proto.go
View file @
69d5916b
...
@@ -138,24 +138,24 @@ type NodeUUID int32
...
@@ -138,24 +138,24 @@ type NodeUUID int32
// TODO NodeType -> base NodeUUID
// TODO NodeType -> base NodeUUID
// ErrDecodeOverflow is the error returned by
NEO
MsgDecode when decoding hit buffer overflow
// ErrDecodeOverflow is the error returned by
neo
MsgDecode when decoding hit buffer overflow
var
ErrDecodeOverflow
=
errors
.
New
(
"decode: bufer overflow"
)
var
ErrDecodeOverflow
=
errors
.
New
(
"decode: bufer overflow"
)
// Msg is the interface implemented by NEO messages to marshal/unmarshal them into/from wire format
// Msg is the interface implemented by NEO messages to marshal/unmarshal them into/from wire format
type
Msg
interface
{
type
Msg
interface
{
//
NEO
MsgCode returns message code needed to be used for particular message type
//
neo
MsgCode returns message code needed to be used for particular message type
// on the wire
// on the wire
NEO
MsgCode
()
uint16
neo
MsgCode
()
uint16
//
NEO
MsgEncodedLen returns how much space is needed to encode current message payload
//
neo
MsgEncodedLen returns how much space is needed to encode current message payload
NEO
MsgEncodedLen
()
int
neo
MsgEncodedLen
()
int
//
NEO
MsgEncode encodes current message state into buf.
//
neo
MsgEncode encodes current message state into buf.
// len(buf) must be >=
NEO
MsgEncodedLen()
// len(buf) must be >=
neo
MsgEncodedLen()
NEO
MsgEncode
(
buf
[]
byte
)
neo
MsgEncode
(
buf
[]
byte
)
//
NEO
MsgDecode decodes data into message in-place.
//
neo
MsgDecode decodes data into message in-place.
NEO
MsgDecode
(
data
[]
byte
)
(
nread
int
,
err
error
)
neo
MsgDecode
(
data
[]
byte
)
(
nread
int
,
err
error
)
}
}
...
@@ -165,7 +165,7 @@ type Address struct {
...
@@ -165,7 +165,7 @@ type Address struct {
}
}
// NOTE if Host == "" -> Port not added to wire (see py.PAddress):
// NOTE if Host == "" -> Port not added to wire (see py.PAddress):
// func (a *Address)
NEO
MsgEncode(b []byte) int {
// func (a *Address)
neo
MsgEncode(b []byte) int {
// n := string_NEOEncode(a.Host, b[0:])
// n := string_NEOEncode(a.Host, b[0:])
// if a.Host != "" {
// if a.Host != "" {
// BigEndian.PutUint16(b[n:], a.Port)
// BigEndian.PutUint16(b[n:], a.Port)
...
...
go/neo/proto_test.go
View file @
69d5916b
...
@@ -82,8 +82,8 @@ func testMsgMarshal(t *testing.T, msg Msg, encoded string) {
...
@@ -82,8 +82,8 @@ func testMsgMarshal(t *testing.T, msg Msg, encoded string) {
}()
}()
// msg.encode() == expected
// msg.encode() == expected
msgCode
:=
msg
.
NEO
MsgCode
()
msgCode
:=
msg
.
neo
MsgCode
()
n
:=
msg
.
NEO
MsgEncodedLen
()
n
:=
msg
.
neo
MsgEncodedLen
()
msgType
:=
msgTypeRegistry
[
msgCode
]
msgType
:=
msgTypeRegistry
[
msgCode
]
if
msgType
!=
typ
{
if
msgType
!=
typ
{
t
.
Errorf
(
"%v: msgCode = %v which corresponds to %v"
,
typ
,
msgCode
,
msgType
)
t
.
Errorf
(
"%v: msgCode = %v which corresponds to %v"
,
typ
,
msgCode
,
msgType
)
...
@@ -93,7 +93,7 @@ func testMsgMarshal(t *testing.T, msg Msg, encoded string) {
...
@@ -93,7 +93,7 @@ func testMsgMarshal(t *testing.T, msg Msg, encoded string) {
}
}
buf
:=
make
([]
byte
,
n
)
buf
:=
make
([]
byte
,
n
)
msg
.
NEO
MsgEncode
(
buf
)
msg
.
neo
MsgEncode
(
buf
)
if
string
(
buf
)
!=
encoded
{
if
string
(
buf
)
!=
encoded
{
t
.
Errorf
(
"%v: encode result unexpected:"
,
typ
)
t
.
Errorf
(
"%v: encode result unexpected:"
,
typ
)
t
.
Errorf
(
"
\t
have: %s"
,
hexpkg
.
EncodeToString
(
buf
))
t
.
Errorf
(
"
\t
have: %s"
,
hexpkg
.
EncodeToString
(
buf
))
...
@@ -123,13 +123,13 @@ func testMsgMarshal(t *testing.T, msg Msg, encoded string) {
...
@@ -123,13 +123,13 @@ func testMsgMarshal(t *testing.T, msg Msg, encoded string) {
}
}
}()
}()
msg
.
NEO
MsgEncode
(
buf
[
:
l
])
msg
.
neo
MsgEncode
(
buf
[
:
l
])
}()
}()
}
}
// msg.decode() == expected
// msg.decode() == expected
data
:=
[]
byte
(
encoded
+
"noise"
)
data
:=
[]
byte
(
encoded
+
"noise"
)
n
,
err
:=
msg2
.
NEO
MsgDecode
(
data
)
n
,
err
:=
msg2
.
neo
MsgDecode
(
data
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Errorf
(
"%v: decode error %v"
,
typ
,
err
)
t
.
Errorf
(
"%v: decode error %v"
,
typ
,
err
)
}
}
...
@@ -143,7 +143,7 @@ func testMsgMarshal(t *testing.T, msg Msg, encoded string) {
...
@@ -143,7 +143,7 @@ func testMsgMarshal(t *testing.T, msg Msg, encoded string) {
// decode must detect buffer overflow
// decode must detect buffer overflow
for
l
:=
len
(
encoded
)
-
1
;
l
>=
0
;
l
--
{
for
l
:=
len
(
encoded
)
-
1
;
l
>=
0
;
l
--
{
n
,
err
=
msg2
.
NEO
MsgDecode
(
data
[
:
l
])
n
,
err
=
msg2
.
neo
MsgDecode
(
data
[
:
l
])
if
!
(
n
==
0
&&
err
==
ErrDecodeOverflow
)
{
if
!
(
n
==
0
&&
err
==
ErrDecodeOverflow
)
{
t
.
Errorf
(
"%v: decode overflow not detected on [:%v]"
,
typ
,
l
)
t
.
Errorf
(
"%v: decode overflow not detected on [:%v]"
,
typ
,
l
)
}
}
...
@@ -271,11 +271,11 @@ func TestMsgMarshalAllOverflowLightly(t *testing.T) {
...
@@ -271,11 +271,11 @@ func TestMsgMarshalAllOverflowLightly(t *testing.T) {
for
_
,
typ
:=
range
msgTypeRegistry
{
for
_
,
typ
:=
range
msgTypeRegistry
{
// zero-value for a type
// zero-value for a type
msg
:=
reflect
.
New
(
typ
)
.
Interface
()
.
(
Msg
)
msg
:=
reflect
.
New
(
typ
)
.
Interface
()
.
(
Msg
)
l
:=
msg
.
NEO
MsgEncodedLen
()
l
:=
msg
.
neo
MsgEncodedLen
()
zerol
:=
make
([]
byte
,
l
)
zerol
:=
make
([]
byte
,
l
)
// decoding will turn nil slice & map into empty allocated ones.
// decoding will turn nil slice & map into empty allocated ones.
// we need it so that reflect.DeepEqual works for msg encode/decode comparison
// we need it so that reflect.DeepEqual works for msg encode/decode comparison
n
,
err
:=
msg
.
NEO
MsgDecode
(
zerol
)
n
,
err
:=
msg
.
neo
MsgDecode
(
zerol
)
if
!
(
n
==
l
&&
err
==
nil
)
{
if
!
(
n
==
l
&&
err
==
nil
)
{
t
.
Errorf
(
"%v: zero-decode unexpected: %v, %v ; want %v, nil"
,
typ
,
n
,
err
,
l
)
t
.
Errorf
(
"%v: zero-decode unexpected: %v, %v ; want %v, nil"
,
typ
,
n
,
err
,
l
)
}
}
...
...
go/neo/protogen.go
View file @
69d5916b
...
@@ -25,10 +25,10 @@ NEO. Protocol module. Code generator
...
@@ -25,10 +25,10 @@ NEO. Protocol module. Code generator
This program generates marshalling code for message types defined in proto.go .
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:
For every type 4 methods are generated in accordance with neo.Msg interface:
NEO
MsgCode() uint16
neo
MsgCode() uint16
NEO
MsgEncodedLen() int
neo
MsgEncodedLen() int
NEO
MsgEncode(buf []byte)
neo
MsgEncode(buf []byte)
NEO
MsgDecode(data []byte) (nread int, err error)
neo
MsgDecode(data []byte) (nread int, err error)
List of message types is obtained via searching through proto.go AST - looking
List of message types is obtained via searching through proto.go AST - looking
for appropriate struct declarations there.
for appropriate struct declarations there.
...
@@ -218,7 +218,7 @@ import (
...
@@ -218,7 +218,7 @@ import (
case
*
ast
.
StructType
:
case
*
ast
.
StructType
:
fmt
.
Fprintf
(
&
buf
,
"// %d. %s
\n\n
"
,
msgCode
,
typename
)
fmt
.
Fprintf
(
&
buf
,
"// %d. %s
\n\n
"
,
msgCode
,
typename
)
buf
.
emit
(
"func (*%s)
NEO
MsgCode() uint16 {"
,
typename
)
buf
.
emit
(
"func (*%s)
neo
MsgCode() uint16 {"
,
typename
)
buf
.
emit
(
"return %d"
,
msgCode
)
buf
.
emit
(
"return %d"
,
msgCode
)
buf
.
emit
(
"}
\n
"
)
buf
.
emit
(
"}
\n
"
)
...
@@ -491,7 +491,7 @@ type sizer struct {
...
@@ -491,7 +491,7 @@ type sizer struct {
//
//
// when type is recursively walked, for every case code to update `data[n:]` is generated.
// when type is recursively walked, for every case code to update `data[n:]` is generated.
// no overflow checks are generated as by neo.Msg interface provided data
// no overflow checks are generated as by neo.Msg interface provided data
// buffer should have at least payloadLen length returned by
NEO
MsgEncodedInfo()
// buffer should have at least payloadLen length returned by
neo
MsgEncodedInfo()
// (the size computed by sizer).
// (the size computed by sizer).
//
//
// the code emitted looks like:
// the code emitted looks like:
...
@@ -500,7 +500,7 @@ type sizer struct {
...
@@ -500,7 +500,7 @@ type sizer struct {
// encode<typ2>(data[n2:], path2)
// encode<typ2>(data[n2:], path2)
// ...
// ...
//
//
// TODO encode have to care in
NEO
MsgEncode to emit preambule such that bound
// TODO encode have to care in
neo
MsgEncode to emit preambule such that bound
// checking is performed only once (currenty compiler emits many of them)
// checking is performed only once (currenty compiler emits many of them)
type
encoder
struct
{
type
encoder
struct
{
commonCodeGen
commonCodeGen
...
@@ -548,7 +548,7 @@ var _ CodeGenerator = (*decoder)(nil)
...
@@ -548,7 +548,7 @@ var _ CodeGenerator = (*decoder)(nil)
func
(
s
*
sizer
)
generatedCode
()
string
{
func
(
s
*
sizer
)
generatedCode
()
string
{
code
:=
Buffer
{}
code
:=
Buffer
{}
// prologue
// prologue
code
.
emit
(
"func (%s *%s)
NEO
MsgEncodedLen() int {"
,
s
.
recvName
,
s
.
typeName
)
code
.
emit
(
"func (%s *%s)
neo
MsgEncodedLen() int {"
,
s
.
recvName
,
s
.
typeName
)
if
s
.
varUsed
[
"size"
]
{
if
s
.
varUsed
[
"size"
]
{
code
.
emit
(
"var %s int"
,
s
.
var_
(
"size"
))
code
.
emit
(
"var %s int"
,
s
.
var_
(
"size"
))
}
}
...
@@ -569,7 +569,7 @@ func (s *sizer) generatedCode() string {
...
@@ -569,7 +569,7 @@ func (s *sizer) generatedCode() string {
func
(
e
*
encoder
)
generatedCode
()
string
{
func
(
e
*
encoder
)
generatedCode
()
string
{
code
:=
Buffer
{}
code
:=
Buffer
{}
// prologue
// prologue
code
.
emit
(
"func (%s *%s)
NEO
MsgEncode(data []byte) {"
,
e
.
recvName
,
e
.
typeName
)
code
.
emit
(
"func (%s *%s)
neo
MsgEncode(data []byte) {"
,
e
.
recvName
,
e
.
typeName
)
code
.
Write
(
e
.
buf
.
Bytes
())
code
.
Write
(
e
.
buf
.
Bytes
())
...
@@ -676,7 +676,7 @@ func (d *decoder) generatedCode() string {
...
@@ -676,7 +676,7 @@ func (d *decoder) generatedCode() string {
code
:=
Buffer
{}
code
:=
Buffer
{}
// prologue
// prologue
code
.
emit
(
"func (%s *%s)
NEO
MsgDecode(data []byte) (int, error) {"
,
d
.
recvName
,
d
.
typeName
)
code
.
emit
(
"func (%s *%s)
neo
MsgDecode(data []byte) (int, error) {"
,
d
.
recvName
,
d
.
typeName
)
if
d
.
varUsed
[
"nread"
]
{
if
d
.
varUsed
[
"nread"
]
{
code
.
emit
(
"var %v uint32"
,
d
.
var_
(
"nread"
))
code
.
emit
(
"var %v uint32"
,
d
.
var_
(
"nread"
))
}
}
...
...
go/neo/zproto-marshal.go
View file @
69d5916b
...
@@ -16,15 +16,15 @@ import (
...
@@ -16,15 +16,15 @@ import (
// 0. Address
// 0. Address
func
(
*
Address
)
NEO
MsgCode
()
uint16
{
func
(
*
Address
)
neo
MsgCode
()
uint16
{
return
0
return
0
}
}
func
(
p
*
Address
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
Address
)
neo
MsgEncodedLen
()
int
{
return
6
+
len
(
p
.
Host
)
return
6
+
len
(
p
.
Host
)
}
}
func
(
p
*
Address
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
Address
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
Host
))
l
:=
uint32
(
len
(
p
.
Host
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -35,7 +35,7 @@ func (p *Address) NEOMsgEncode(data []byte) {
...
@@ -35,7 +35,7 @@ func (p *Address) NEOMsgEncode(data []byte) {
binary
.
BigEndian
.
PutUint16
(
data
[
0
:
],
p
.
Port
)
binary
.
BigEndian
.
PutUint16
(
data
[
0
:
],
p
.
Port
)
}
}
func
(
p
*
Address
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Address
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -59,15 +59,15 @@ overflow:
...
@@ -59,15 +59,15 @@ overflow:
// 1. NodeInfo
// 1. NodeInfo
func
(
*
NodeInfo
)
NEO
MsgCode
()
uint16
{
func
(
*
NodeInfo
)
neo
MsgCode
()
uint16
{
return
1
return
1
}
}
func
(
p
*
NodeInfo
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
NodeInfo
)
neo
MsgEncodedLen
()
int
{
return
26
+
len
(
p
.
Address
.
Host
)
return
26
+
len
(
p
.
Address
.
Host
)
}
}
func
(
p
*
NodeInfo
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
NodeInfo
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
{
{
l
:=
uint32
(
len
(
p
.
Address
.
Host
))
l
:=
uint32
(
len
(
p
.
Address
.
Host
))
...
@@ -82,7 +82,7 @@ func (p *NodeInfo) NEOMsgEncode(data []byte) {
...
@@ -82,7 +82,7 @@ func (p *NodeInfo) NEOMsgEncode(data []byte) {
float64_NEOEncode
(
data
[
10
:
],
p
.
IdTimestamp
)
float64_NEOEncode
(
data
[
10
:
],
p
.
IdTimestamp
)
}
}
func
(
p
*
NodeInfo
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NodeInfo
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
...
@@ -110,20 +110,20 @@ overflow:
...
@@ -110,20 +110,20 @@ overflow:
// 2. CellInfo
// 2. CellInfo
func
(
*
CellInfo
)
NEO
MsgCode
()
uint16
{
func
(
*
CellInfo
)
neo
MsgCode
()
uint16
{
return
2
return
2
}
}
func
(
p
*
CellInfo
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
CellInfo
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
CellInfo
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
CellInfo
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeUUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeUUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
CellState
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
CellState
)))
}
}
func
(
p
*
CellInfo
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CellInfo
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -137,15 +137,15 @@ overflow:
...
@@ -137,15 +137,15 @@ overflow:
// 3. RowInfo
// 3. RowInfo
func
(
*
RowInfo
)
NEO
MsgCode
()
uint16
{
func
(
*
RowInfo
)
neo
MsgCode
()
uint16
{
return
3
return
3
}
}
func
(
p
*
RowInfo
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
RowInfo
)
neo
MsgEncodedLen
()
int
{
return
8
+
len
(
p
.
CellList
)
*
8
return
8
+
len
(
p
.
CellList
)
*
8
}
}
func
(
p
*
RowInfo
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
RowInfo
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Offset
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Offset
)
{
{
l
:=
uint32
(
len
(
p
.
CellList
))
l
:=
uint32
(
len
(
p
.
CellList
))
...
@@ -160,7 +160,7 @@ func (p *RowInfo) NEOMsgEncode(data []byte) {
...
@@ -160,7 +160,7 @@ func (p *RowInfo) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
RowInfo
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
RowInfo
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
...
@@ -189,15 +189,15 @@ overflow:
...
@@ -189,15 +189,15 @@ overflow:
// 4. Error
// 4. Error
func
(
*
Error
)
NEO
MsgCode
()
uint16
{
func
(
*
Error
)
neo
MsgCode
()
uint16
{
return
4
return
4
}
}
func
(
p
*
Error
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
Error
)
neo
MsgEncodedLen
()
int
{
return
8
+
len
(
p
.
Message
)
return
8
+
len
(
p
.
Message
)
}
}
func
(
p
*
Error
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
Error
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
p
.
Code
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
p
.
Code
))
{
{
l
:=
uint32
(
len
(
p
.
Message
))
l
:=
uint32
(
len
(
p
.
Message
))
...
@@ -208,7 +208,7 @@ func (p *Error) NEOMsgEncode(data []byte) {
...
@@ -208,7 +208,7 @@ func (p *Error) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
Error
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Error
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
...
@@ -232,49 +232,49 @@ overflow:
...
@@ -232,49 +232,49 @@ overflow:
// 5. Ping
// 5. Ping
func
(
*
Ping
)
NEO
MsgCode
()
uint16
{
func
(
*
Ping
)
neo
MsgCode
()
uint16
{
return
5
return
5
}
}
func
(
p
*
Ping
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
Ping
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
Ping
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
Ping
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
Ping
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Ping
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 6. CloseClient
// 6. CloseClient
func
(
*
CloseClient
)
NEO
MsgCode
()
uint16
{
func
(
*
CloseClient
)
neo
MsgCode
()
uint16
{
return
6
return
6
}
}
func
(
p
*
CloseClient
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
CloseClient
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
CloseClient
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
CloseClient
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
CloseClient
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CloseClient
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 7. RequestIdentification
// 7. RequestIdentification
func
(
*
RequestIdentification
)
NEO
MsgCode
()
uint16
{
func
(
*
RequestIdentification
)
neo
MsgCode
()
uint16
{
return
7
return
7
}
}
func
(
p
*
RequestIdentification
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
RequestIdentification
)
neo
MsgEncodedLen
()
int
{
return
26
+
len
(
p
.
Address
.
Host
)
+
len
(
p
.
ClusterName
)
return
26
+
len
(
p
.
Address
.
Host
)
+
len
(
p
.
ClusterName
)
}
}
func
(
p
*
RequestIdentification
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
RequestIdentification
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
NodeUUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
NodeUUID
)))
{
{
...
@@ -295,7 +295,7 @@ func (p *RequestIdentification) NEOMsgEncode(data []byte) {
...
@@ -295,7 +295,7 @@ func (p *RequestIdentification) NEOMsgEncode(data []byte) {
float64_NEOEncode
(
data
[
0
:
],
p
.
IdTimestamp
)
float64_NEOEncode
(
data
[
0
:
],
p
.
IdTimestamp
)
}
}
func
(
p
*
RequestIdentification
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
RequestIdentification
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -332,15 +332,15 @@ overflow:
...
@@ -332,15 +332,15 @@ overflow:
// 8. AcceptIdentification
// 8. AcceptIdentification
func
(
*
AcceptIdentification
)
NEO
MsgCode
()
uint16
{
func
(
*
AcceptIdentification
)
neo
MsgCode
()
uint16
{
return
8
return
8
}
}
func
(
p
*
AcceptIdentification
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AcceptIdentification
)
neo
MsgEncodedLen
()
int
{
return
20
return
20
}
}
func
(
p
*
AcceptIdentification
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AcceptIdentification
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
MyNodeUUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
MyNodeUUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
8
:
],
p
.
NumPartitions
)
binary
.
BigEndian
.
PutUint32
(
data
[
8
:
],
p
.
NumPartitions
)
...
@@ -348,7 +348,7 @@ func (p *AcceptIdentification) NEOMsgEncode(data []byte) {
...
@@ -348,7 +348,7 @@ func (p *AcceptIdentification) NEOMsgEncode(data []byte) {
binary
.
BigEndian
.
PutUint32
(
data
[
16
:
],
uint32
(
int32
(
p
.
YourNodeUUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
16
:
],
uint32
(
int32
(
p
.
YourNodeUUID
)))
}
}
func
(
p
*
AcceptIdentification
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AcceptIdentification
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
20
{
if
uint32
(
len
(
data
))
<
20
{
goto
overflow
goto
overflow
}
}
...
@@ -365,36 +365,36 @@ overflow:
...
@@ -365,36 +365,36 @@ overflow:
// 9. PrimaryMaster
// 9. PrimaryMaster
func
(
*
PrimaryMaster
)
NEO
MsgCode
()
uint16
{
func
(
*
PrimaryMaster
)
neo
MsgCode
()
uint16
{
return
9
return
9
}
}
func
(
p
*
PrimaryMaster
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
PrimaryMaster
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
PrimaryMaster
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
PrimaryMaster
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
PrimaryMaster
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
PrimaryMaster
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 10. AnswerPrimary
// 10. AnswerPrimary
func
(
*
AnswerPrimary
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerPrimary
)
neo
MsgCode
()
uint16
{
return
10
return
10
}
}
func
(
p
*
AnswerPrimary
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerPrimary
)
neo
MsgEncodedLen
()
int
{
return
4
return
4
}
}
func
(
p
*
AnswerPrimary
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerPrimary
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
PrimaryNodeUUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
PrimaryNodeUUID
)))
}
}
func
(
p
*
AnswerPrimary
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerPrimary
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
}
}
...
@@ -407,11 +407,11 @@ overflow:
...
@@ -407,11 +407,11 @@ overflow:
// 11. NotPrimaryMaster
// 11. NotPrimaryMaster
func
(
*
NotPrimaryMaster
)
NEO
MsgCode
()
uint16
{
func
(
*
NotPrimaryMaster
)
neo
MsgCode
()
uint16
{
return
11
return
11
}
}
func
(
p
*
NotPrimaryMaster
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
NotPrimaryMaster
)
neo
MsgEncodedLen
()
int
{
var
size
int
var
size
int
for
i
:=
0
;
i
<
len
(
p
.
KnownMasterList
);
i
++
{
for
i
:=
0
;
i
<
len
(
p
.
KnownMasterList
);
i
++
{
a
:=
&
p
.
KnownMasterList
[
i
]
a
:=
&
p
.
KnownMasterList
[
i
]
...
@@ -420,7 +420,7 @@ func (p *NotPrimaryMaster) NEOMsgEncodedLen() int {
...
@@ -420,7 +420,7 @@ func (p *NotPrimaryMaster) NEOMsgEncodedLen() int {
return
8
+
len
(
p
.
KnownMasterList
)
*
6
+
size
return
8
+
len
(
p
.
KnownMasterList
)
*
6
+
size
}
}
func
(
p
*
NotPrimaryMaster
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
NotPrimaryMaster
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
Primary
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
Primary
)))
{
{
l
:=
uint32
(
len
(
p
.
KnownMasterList
))
l
:=
uint32
(
len
(
p
.
KnownMasterList
))
...
@@ -441,7 +441,7 @@ func (p *NotPrimaryMaster) NEOMsgEncode(data []byte) {
...
@@ -441,7 +441,7 @@ func (p *NotPrimaryMaster) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
NotPrimaryMaster
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotPrimaryMaster
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
...
@@ -479,38 +479,38 @@ overflow:
...
@@ -479,38 +479,38 @@ overflow:
// 12. Recovery
// 12. Recovery
func
(
*
Recovery
)
NEO
MsgCode
()
uint16
{
func
(
*
Recovery
)
neo
MsgCode
()
uint16
{
return
12
return
12
}
}
func
(
p
*
Recovery
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
Recovery
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
Recovery
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
Recovery
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
Recovery
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Recovery
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 13. AnswerRecovery
// 13. AnswerRecovery
func
(
*
AnswerRecovery
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerRecovery
)
neo
MsgCode
()
uint16
{
return
13
return
13
}
}
func
(
p
*
AnswerRecovery
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerRecovery
)
neo
MsgEncodedLen
()
int
{
return
24
return
24
}
}
func
(
p
*
AnswerRecovery
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerRecovery
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
BackupTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
BackupTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
TruncateTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
TruncateTid
))
}
}
func
(
p
*
AnswerRecovery
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerRecovery
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
24
{
if
uint32
(
len
(
data
))
<
24
{
goto
overflow
goto
overflow
}
}
...
@@ -525,37 +525,37 @@ overflow:
...
@@ -525,37 +525,37 @@ overflow:
// 14. LastIDs
// 14. LastIDs
func
(
*
LastIDs
)
NEO
MsgCode
()
uint16
{
func
(
*
LastIDs
)
neo
MsgCode
()
uint16
{
return
14
return
14
}
}
func
(
p
*
LastIDs
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
LastIDs
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
LastIDs
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
LastIDs
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
LastIDs
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
LastIDs
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 15. AnswerLastIDs
// 15. AnswerLastIDs
func
(
*
AnswerLastIDs
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerLastIDs
)
neo
MsgCode
()
uint16
{
return
15
return
15
}
}
func
(
p
*
AnswerLastIDs
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerLastIDs
)
neo
MsgEncodedLen
()
int
{
return
16
return
16
}
}
func
(
p
*
AnswerLastIDs
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerLastIDs
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
LastOid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
LastOid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LastTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LastTid
))
}
}
func
(
p
*
AnswerLastIDs
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerLastIDs
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
16
{
if
uint32
(
len
(
data
))
<
16
{
goto
overflow
goto
overflow
}
}
...
@@ -569,28 +569,28 @@ overflow:
...
@@ -569,28 +569,28 @@ overflow:
// 16. AskPartitionTable
// 16. AskPartitionTable
func
(
*
AskPartitionTable
)
NEO
MsgCode
()
uint16
{
func
(
*
AskPartitionTable
)
neo
MsgCode
()
uint16
{
return
16
return
16
}
}
func
(
p
*
AskPartitionTable
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AskPartitionTable
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
AskPartitionTable
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AskPartitionTable
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
AskPartitionTable
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AskPartitionTable
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 17. AnswerPartitionTable
// 17. AnswerPartitionTable
func
(
*
AnswerPartitionTable
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerPartitionTable
)
neo
MsgCode
()
uint16
{
return
17
return
17
}
}
func
(
p
*
AnswerPartitionTable
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerPartitionTable
)
neo
MsgEncodedLen
()
int
{
var
size
int
var
size
int
for
i
:=
0
;
i
<
len
(
p
.
RowList
);
i
++
{
for
i
:=
0
;
i
<
len
(
p
.
RowList
);
i
++
{
a
:=
&
p
.
RowList
[
i
]
a
:=
&
p
.
RowList
[
i
]
...
@@ -599,7 +599,7 @@ func (p *AnswerPartitionTable) NEOMsgEncodedLen() int {
...
@@ -599,7 +599,7 @@ func (p *AnswerPartitionTable) NEOMsgEncodedLen() int {
return
12
+
len
(
p
.
RowList
)
*
8
+
size
return
12
+
len
(
p
.
RowList
)
*
8
+
size
}
}
func
(
p
*
AnswerPartitionTable
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerPartitionTable
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
{
{
l
:=
uint32
(
len
(
p
.
RowList
))
l
:=
uint32
(
len
(
p
.
RowList
))
...
@@ -624,7 +624,7 @@ func (p *AnswerPartitionTable) NEOMsgEncode(data []byte) {
...
@@ -624,7 +624,7 @@ func (p *AnswerPartitionTable) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerPartitionTable
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerPartitionTable
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -666,11 +666,11 @@ overflow:
...
@@ -666,11 +666,11 @@ overflow:
// 18. NotifyPartitionTable
// 18. NotifyPartitionTable
func
(
*
NotifyPartitionTable
)
NEO
MsgCode
()
uint16
{
func
(
*
NotifyPartitionTable
)
neo
MsgCode
()
uint16
{
return
18
return
18
}
}
func
(
p
*
NotifyPartitionTable
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
NotifyPartitionTable
)
neo
MsgEncodedLen
()
int
{
var
size
int
var
size
int
for
i
:=
0
;
i
<
len
(
p
.
RowList
);
i
++
{
for
i
:=
0
;
i
<
len
(
p
.
RowList
);
i
++
{
a
:=
&
p
.
RowList
[
i
]
a
:=
&
p
.
RowList
[
i
]
...
@@ -679,7 +679,7 @@ func (p *NotifyPartitionTable) NEOMsgEncodedLen() int {
...
@@ -679,7 +679,7 @@ func (p *NotifyPartitionTable) NEOMsgEncodedLen() int {
return
12
+
len
(
p
.
RowList
)
*
8
+
size
return
12
+
len
(
p
.
RowList
)
*
8
+
size
}
}
func
(
p
*
NotifyPartitionTable
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
NotifyPartitionTable
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
{
{
l
:=
uint32
(
len
(
p
.
RowList
))
l
:=
uint32
(
len
(
p
.
RowList
))
...
@@ -704,7 +704,7 @@ func (p *NotifyPartitionTable) NEOMsgEncode(data []byte) {
...
@@ -704,7 +704,7 @@ func (p *NotifyPartitionTable) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
NotifyPartitionTable
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotifyPartitionTable
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -746,15 +746,15 @@ overflow:
...
@@ -746,15 +746,15 @@ overflow:
// 19. NotifyPartitionChanges
// 19. NotifyPartitionChanges
func
(
*
NotifyPartitionChanges
)
NEO
MsgCode
()
uint16
{
func
(
*
NotifyPartitionChanges
)
neo
MsgCode
()
uint16
{
return
19
return
19
}
}
func
(
p
*
NotifyPartitionChanges
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
NotifyPartitionChanges
)
neo
MsgEncodedLen
()
int
{
return
12
+
len
(
p
.
CellList
)
*
12
return
12
+
len
(
p
.
CellList
)
*
12
}
}
func
(
p
*
NotifyPartitionChanges
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
NotifyPartitionChanges
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
{
{
l
:=
uint32
(
len
(
p
.
CellList
))
l
:=
uint32
(
len
(
p
.
CellList
))
...
@@ -770,7 +770,7 @@ func (p *NotifyPartitionChanges) NEOMsgEncode(data []byte) {
...
@@ -770,7 +770,7 @@ func (p *NotifyPartitionChanges) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
NotifyPartitionChanges
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotifyPartitionChanges
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -803,19 +803,19 @@ overflow:
...
@@ -803,19 +803,19 @@ overflow:
// 20. StartOperation
// 20. StartOperation
func
(
*
StartOperation
)
NEO
MsgCode
()
uint16
{
func
(
*
StartOperation
)
neo
MsgCode
()
uint16
{
return
20
return
20
}
}
func
(
p
*
StartOperation
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
StartOperation
)
neo
MsgEncodedLen
()
int
{
return
1
return
1
}
}
func
(
p
*
StartOperation
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
StartOperation
)
neo
MsgEncode
(
data
[]
byte
)
{
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
Backup
)
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
Backup
)
}
}
func
(
p
*
StartOperation
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
StartOperation
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
1
{
if
uint32
(
len
(
data
))
<
1
{
goto
overflow
goto
overflow
}
}
...
@@ -828,32 +828,32 @@ overflow:
...
@@ -828,32 +828,32 @@ overflow:
// 21. StopOperation
// 21. StopOperation
func
(
*
StopOperation
)
NEO
MsgCode
()
uint16
{
func
(
*
StopOperation
)
neo
MsgCode
()
uint16
{
return
21
return
21
}
}
func
(
p
*
StopOperation
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
StopOperation
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
StopOperation
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
StopOperation
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
StopOperation
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
StopOperation
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 22. UnfinishedTransactions
// 22. UnfinishedTransactions
func
(
*
UnfinishedTransactions
)
NEO
MsgCode
()
uint16
{
func
(
*
UnfinishedTransactions
)
neo
MsgCode
()
uint16
{
return
22
return
22
}
}
func
(
p
*
UnfinishedTransactions
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
UnfinishedTransactions
)
neo
MsgEncodedLen
()
int
{
return
4
+
len
(
p
.
RowList
)
*
4
return
4
+
len
(
p
.
RowList
)
*
4
}
}
func
(
p
*
UnfinishedTransactions
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
UnfinishedTransactions
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
RowList
))
l
:=
uint32
(
len
(
p
.
RowList
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -866,7 +866,7 @@ func (p *UnfinishedTransactions) NEOMsgEncode(data []byte) {
...
@@ -866,7 +866,7 @@ func (p *UnfinishedTransactions) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
UnfinishedTransactions
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
UnfinishedTransactions
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -893,15 +893,15 @@ overflow:
...
@@ -893,15 +893,15 @@ overflow:
// 23. AnswerUnfinishedTransactions
// 23. AnswerUnfinishedTransactions
func
(
*
AnswerUnfinishedTransactions
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerUnfinishedTransactions
)
neo
MsgCode
()
uint16
{
return
23
return
23
}
}
func
(
p
*
AnswerUnfinishedTransactions
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerUnfinishedTransactions
)
neo
MsgEncodedLen
()
int
{
return
12
+
len
(
p
.
TidList
)
*
8
return
12
+
len
(
p
.
TidList
)
*
8
}
}
func
(
p
*
AnswerUnfinishedTransactions
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerUnfinishedTransactions
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
MaxTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
MaxTID
))
{
{
l
:=
uint32
(
len
(
p
.
TidList
))
l
:=
uint32
(
len
(
p
.
TidList
))
...
@@ -915,7 +915,7 @@ func (p *AnswerUnfinishedTransactions) NEOMsgEncode(data []byte) {
...
@@ -915,7 +915,7 @@ func (p *AnswerUnfinishedTransactions) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerUnfinishedTransactions
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerUnfinishedTransactions
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -943,32 +943,32 @@ overflow:
...
@@ -943,32 +943,32 @@ overflow:
// 24. LockedTransactions
// 24. LockedTransactions
func
(
*
LockedTransactions
)
NEO
MsgCode
()
uint16
{
func
(
*
LockedTransactions
)
neo
MsgCode
()
uint16
{
return
24
return
24
}
}
func
(
p
*
LockedTransactions
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
LockedTransactions
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
LockedTransactions
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
LockedTransactions
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
LockedTransactions
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
LockedTransactions
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 25. AnswerLockedTransactions
// 25. AnswerLockedTransactions
func
(
*
AnswerLockedTransactions
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerLockedTransactions
)
neo
MsgCode
()
uint16
{
return
25
return
25
}
}
func
(
p
*
AnswerLockedTransactions
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerLockedTransactions
)
neo
MsgEncodedLen
()
int
{
return
4
+
len
(
p
.
TidDict
)
*
16
return
4
+
len
(
p
.
TidDict
)
*
16
}
}
func
(
p
*
AnswerLockedTransactions
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerLockedTransactions
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
TidDict
))
l
:=
uint32
(
len
(
p
.
TidDict
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -986,7 +986,7 @@ func (p *AnswerLockedTransactions) NEOMsgEncode(data []byte) {
...
@@ -986,7 +986,7 @@ func (p *AnswerLockedTransactions) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerLockedTransactions
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerLockedTransactions
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -1014,19 +1014,19 @@ overflow:
...
@@ -1014,19 +1014,19 @@ overflow:
// 26. FinalTID
// 26. FinalTID
func
(
*
FinalTID
)
NEO
MsgCode
()
uint16
{
func
(
*
FinalTID
)
neo
MsgCode
()
uint16
{
return
26
return
26
}
}
func
(
p
*
FinalTID
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
FinalTID
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
FinalTID
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
FinalTID
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
}
}
func
(
p
*
FinalTID
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
FinalTID
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -1039,19 +1039,19 @@ overflow:
...
@@ -1039,19 +1039,19 @@ overflow:
// 27. AnswerFinalTID
// 27. AnswerFinalTID
func
(
*
AnswerFinalTID
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerFinalTID
)
neo
MsgCode
()
uint16
{
return
27
return
27
}
}
func
(
p
*
AnswerFinalTID
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerFinalTID
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
AnswerFinalTID
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerFinalTID
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
AnswerFinalTID
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerFinalTID
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -1064,20 +1064,20 @@ overflow:
...
@@ -1064,20 +1064,20 @@ overflow:
// 28. ValidateTransaction
// 28. ValidateTransaction
func
(
*
ValidateTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
ValidateTransaction
)
neo
MsgCode
()
uint16
{
return
28
return
28
}
}
func
(
p
*
ValidateTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
ValidateTransaction
)
neo
MsgEncodedLen
()
int
{
return
16
return
16
}
}
func
(
p
*
ValidateTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
ValidateTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
ValidateTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
ValidateTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
16
{
if
uint32
(
len
(
data
))
<
16
{
goto
overflow
goto
overflow
}
}
...
@@ -1091,19 +1091,19 @@ overflow:
...
@@ -1091,19 +1091,19 @@ overflow:
// 29. BeginTransaction
// 29. BeginTransaction
func
(
*
BeginTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
BeginTransaction
)
neo
MsgCode
()
uint16
{
return
29
return
29
}
}
func
(
p
*
BeginTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
BeginTransaction
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
BeginTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
BeginTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
BeginTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
BeginTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -1116,19 +1116,19 @@ overflow:
...
@@ -1116,19 +1116,19 @@ overflow:
// 30. AnswerBeginTransaction
// 30. AnswerBeginTransaction
func
(
*
AnswerBeginTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerBeginTransaction
)
neo
MsgCode
()
uint16
{
return
30
return
30
}
}
func
(
p
*
AnswerBeginTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerBeginTransaction
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
AnswerBeginTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerBeginTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
AnswerBeginTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerBeginTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -1141,15 +1141,15 @@ overflow:
...
@@ -1141,15 +1141,15 @@ overflow:
// 31. FailedVote
// 31. FailedVote
func
(
*
FailedVote
)
NEO
MsgCode
()
uint16
{
func
(
*
FailedVote
)
neo
MsgCode
()
uint16
{
return
31
return
31
}
}
func
(
p
*
FailedVote
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
FailedVote
)
neo
MsgEncodedLen
()
int
{
return
12
+
len
(
p
.
NodeList
)
*
4
return
12
+
len
(
p
.
NodeList
)
*
4
}
}
func
(
p
*
FailedVote
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
FailedVote
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
{
{
l
:=
uint32
(
len
(
p
.
NodeList
))
l
:=
uint32
(
len
(
p
.
NodeList
))
...
@@ -1163,7 +1163,7 @@ func (p *FailedVote) NEOMsgEncode(data []byte) {
...
@@ -1163,7 +1163,7 @@ func (p *FailedVote) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
FailedVote
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
FailedVote
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -1191,15 +1191,15 @@ overflow:
...
@@ -1191,15 +1191,15 @@ overflow:
// 32. FinishTransaction
// 32. FinishTransaction
func
(
*
FinishTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
FinishTransaction
)
neo
MsgCode
()
uint16
{
return
32
return
32
}
}
func
(
p
*
FinishTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
FinishTransaction
)
neo
MsgEncodedLen
()
int
{
return
16
+
len
(
p
.
OIDList
)
*
8
+
len
(
p
.
CheckedList
)
*
8
return
16
+
len
(
p
.
OIDList
)
*
8
+
len
(
p
.
CheckedList
)
*
8
}
}
func
(
p
*
FinishTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
FinishTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
{
{
l
:=
uint32
(
len
(
p
.
OIDList
))
l
:=
uint32
(
len
(
p
.
OIDList
))
...
@@ -1223,7 +1223,7 @@ func (p *FinishTransaction) NEOMsgEncode(data []byte) {
...
@@ -1223,7 +1223,7 @@ func (p *FinishTransaction) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
FinishTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
FinishTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -1265,20 +1265,20 @@ overflow:
...
@@ -1265,20 +1265,20 @@ overflow:
// 33. AnswerFinishTransaction
// 33. AnswerFinishTransaction
func
(
*
AnswerFinishTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerFinishTransaction
)
neo
MsgCode
()
uint16
{
return
33
return
33
}
}
func
(
p
*
AnswerFinishTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerFinishTransaction
)
neo
MsgEncodedLen
()
int
{
return
16
return
16
}
}
func
(
p
*
AnswerFinishTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerFinishTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
AnswerFinishTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerFinishTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
16
{
if
uint32
(
len
(
data
))
<
16
{
goto
overflow
goto
overflow
}
}
...
@@ -1292,20 +1292,20 @@ overflow:
...
@@ -1292,20 +1292,20 @@ overflow:
// 34. NotifyTransactionFinished
// 34. NotifyTransactionFinished
func
(
*
NotifyTransactionFinished
)
NEO
MsgCode
()
uint16
{
func
(
*
NotifyTransactionFinished
)
neo
MsgCode
()
uint16
{
return
34
return
34
}
}
func
(
p
*
NotifyTransactionFinished
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
NotifyTransactionFinished
)
neo
MsgEncodedLen
()
int
{
return
16
return
16
}
}
func
(
p
*
NotifyTransactionFinished
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
NotifyTransactionFinished
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MaxTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MaxTID
))
}
}
func
(
p
*
NotifyTransactionFinished
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotifyTransactionFinished
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
16
{
if
uint32
(
len
(
data
))
<
16
{
goto
overflow
goto
overflow
}
}
...
@@ -1319,20 +1319,20 @@ overflow:
...
@@ -1319,20 +1319,20 @@ overflow:
// 35. LockInformation
// 35. LockInformation
func
(
*
LockInformation
)
NEO
MsgCode
()
uint16
{
func
(
*
LockInformation
)
neo
MsgCode
()
uint16
{
return
35
return
35
}
}
func
(
p
*
LockInformation
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
LockInformation
)
neo
MsgEncodedLen
()
int
{
return
16
return
16
}
}
func
(
p
*
LockInformation
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
LockInformation
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Ttid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Ttid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
LockInformation
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
LockInformation
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
16
{
if
uint32
(
len
(
data
))
<
16
{
goto
overflow
goto
overflow
}
}
...
@@ -1346,19 +1346,19 @@ overflow:
...
@@ -1346,19 +1346,19 @@ overflow:
// 36. AnswerLockInformation
// 36. AnswerLockInformation
func
(
*
AnswerLockInformation
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerLockInformation
)
neo
MsgCode
()
uint16
{
return
36
return
36
}
}
func
(
p
*
AnswerLockInformation
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerLockInformation
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
AnswerLockInformation
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerLockInformation
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Ttid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Ttid
))
}
}
func
(
p
*
AnswerLockInformation
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerLockInformation
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -1371,15 +1371,15 @@ overflow:
...
@@ -1371,15 +1371,15 @@ overflow:
// 37. InvalidateObjects
// 37. InvalidateObjects
func
(
*
InvalidateObjects
)
NEO
MsgCode
()
uint16
{
func
(
*
InvalidateObjects
)
neo
MsgCode
()
uint16
{
return
37
return
37
}
}
func
(
p
*
InvalidateObjects
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
InvalidateObjects
)
neo
MsgEncodedLen
()
int
{
return
12
+
len
(
p
.
OidList
)
*
8
return
12
+
len
(
p
.
OidList
)
*
8
}
}
func
(
p
*
InvalidateObjects
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
InvalidateObjects
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
{
{
l
:=
uint32
(
len
(
p
.
OidList
))
l
:=
uint32
(
len
(
p
.
OidList
))
...
@@ -1393,7 +1393,7 @@ func (p *InvalidateObjects) NEOMsgEncode(data []byte) {
...
@@ -1393,7 +1393,7 @@ func (p *InvalidateObjects) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
InvalidateObjects
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
InvalidateObjects
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -1421,19 +1421,19 @@ overflow:
...
@@ -1421,19 +1421,19 @@ overflow:
// 38. UnlockInformation
// 38. UnlockInformation
func
(
*
UnlockInformation
)
NEO
MsgCode
()
uint16
{
func
(
*
UnlockInformation
)
neo
MsgCode
()
uint16
{
return
38
return
38
}
}
func
(
p
*
UnlockInformation
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
UnlockInformation
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
UnlockInformation
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
UnlockInformation
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
}
}
func
(
p
*
UnlockInformation
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
UnlockInformation
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -1446,19 +1446,19 @@ overflow:
...
@@ -1446,19 +1446,19 @@ overflow:
// 39. GenerateOIDs
// 39. GenerateOIDs
func
(
*
GenerateOIDs
)
NEO
MsgCode
()
uint16
{
func
(
*
GenerateOIDs
)
neo
MsgCode
()
uint16
{
return
39
return
39
}
}
func
(
p
*
GenerateOIDs
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
GenerateOIDs
)
neo
MsgEncodedLen
()
int
{
return
4
return
4
}
}
func
(
p
*
GenerateOIDs
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
GenerateOIDs
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
NumOIDs
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
NumOIDs
)
}
}
func
(
p
*
GenerateOIDs
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
GenerateOIDs
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
}
}
...
@@ -1471,15 +1471,15 @@ overflow:
...
@@ -1471,15 +1471,15 @@ overflow:
// 40. AnswerGenerateOIDs
// 40. AnswerGenerateOIDs
func
(
*
AnswerGenerateOIDs
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerGenerateOIDs
)
neo
MsgCode
()
uint16
{
return
40
return
40
}
}
func
(
p
*
AnswerGenerateOIDs
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerGenerateOIDs
)
neo
MsgEncodedLen
()
int
{
return
4
+
len
(
p
.
OidList
)
*
8
return
4
+
len
(
p
.
OidList
)
*
8
}
}
func
(
p
*
AnswerGenerateOIDs
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerGenerateOIDs
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
OidList
))
l
:=
uint32
(
len
(
p
.
OidList
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -1492,7 +1492,7 @@ func (p *AnswerGenerateOIDs) NEOMsgEncode(data []byte) {
...
@@ -1492,7 +1492,7 @@ func (p *AnswerGenerateOIDs) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerGenerateOIDs
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerGenerateOIDs
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -1519,20 +1519,20 @@ overflow:
...
@@ -1519,20 +1519,20 @@ overflow:
// 41. Deadlock
// 41. Deadlock
func
(
*
Deadlock
)
NEO
MsgCode
()
uint16
{
func
(
*
Deadlock
)
neo
MsgCode
()
uint16
{
return
41
return
41
}
}
func
(
p
*
Deadlock
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
Deadlock
)
neo
MsgEncodedLen
()
int
{
return
16
return
16
}
}
func
(
p
*
Deadlock
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
Deadlock
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LockingTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LockingTid
))
}
}
func
(
p
*
Deadlock
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Deadlock
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
16
{
if
uint32
(
len
(
data
))
<
16
{
goto
overflow
goto
overflow
}
}
...
@@ -1546,20 +1546,20 @@ overflow:
...
@@ -1546,20 +1546,20 @@ overflow:
// 42. RebaseTransaction
// 42. RebaseTransaction
func
(
*
RebaseTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
RebaseTransaction
)
neo
MsgCode
()
uint16
{
return
42
return
42
}
}
func
(
p
*
RebaseTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
RebaseTransaction
)
neo
MsgEncodedLen
()
int
{
return
16
return
16
}
}
func
(
p
*
RebaseTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
RebaseTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LockingTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LockingTid
))
}
}
func
(
p
*
RebaseTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
RebaseTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
16
{
if
uint32
(
len
(
data
))
<
16
{
goto
overflow
goto
overflow
}
}
...
@@ -1573,15 +1573,15 @@ overflow:
...
@@ -1573,15 +1573,15 @@ overflow:
// 43. AnswerRebaseTransaction
// 43. AnswerRebaseTransaction
func
(
*
AnswerRebaseTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerRebaseTransaction
)
neo
MsgCode
()
uint16
{
return
43
return
43
}
}
func
(
p
*
AnswerRebaseTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerRebaseTransaction
)
neo
MsgEncodedLen
()
int
{
return
4
+
len
(
p
.
OidList
)
*
8
return
4
+
len
(
p
.
OidList
)
*
8
}
}
func
(
p
*
AnswerRebaseTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerRebaseTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
OidList
))
l
:=
uint32
(
len
(
p
.
OidList
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -1594,7 +1594,7 @@ func (p *AnswerRebaseTransaction) NEOMsgEncode(data []byte) {
...
@@ -1594,7 +1594,7 @@ func (p *AnswerRebaseTransaction) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerRebaseTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerRebaseTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -1621,20 +1621,20 @@ overflow:
...
@@ -1621,20 +1621,20 @@ overflow:
// 44. RebaseObject
// 44. RebaseObject
func
(
*
RebaseObject
)
NEO
MsgCode
()
uint16
{
func
(
*
RebaseObject
)
neo
MsgCode
()
uint16
{
return
44
return
44
}
}
func
(
p
*
RebaseObject
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
RebaseObject
)
neo
MsgEncodedLen
()
int
{
return
16
return
16
}
}
func
(
p
*
RebaseObject
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
RebaseObject
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Oid
))
}
}
func
(
p
*
RebaseObject
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
RebaseObject
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
16
{
if
uint32
(
len
(
data
))
<
16
{
goto
overflow
goto
overflow
}
}
...
@@ -1648,15 +1648,15 @@ overflow:
...
@@ -1648,15 +1648,15 @@ overflow:
// 45. AnswerRebaseObject
// 45. AnswerRebaseObject
func
(
*
AnswerRebaseObject
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerRebaseObject
)
neo
MsgCode
()
uint16
{
return
45
return
45
}
}
func
(
p
*
AnswerRebaseObject
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerRebaseObject
)
neo
MsgEncodedLen
()
int
{
return
41
+
len
(
p
.
Data
)
return
41
+
len
(
p
.
Data
)
}
}
func
(
p
*
AnswerRebaseObject
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerRebaseObject
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Serial
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Serial
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
ConflictSerial
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
ConflictSerial
))
(
data
[
16
:
])[
0
]
=
bool2byte
(
p
.
Compression
)
(
data
[
16
:
])[
0
]
=
bool2byte
(
p
.
Compression
)
...
@@ -1670,7 +1670,7 @@ func (p *AnswerRebaseObject) NEOMsgEncode(data []byte) {
...
@@ -1670,7 +1670,7 @@ func (p *AnswerRebaseObject) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerRebaseObject
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerRebaseObject
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
41
{
if
uint32
(
len
(
data
))
<
41
{
goto
overflow
goto
overflow
...
@@ -1698,15 +1698,15 @@ overflow:
...
@@ -1698,15 +1698,15 @@ overflow:
// 46. StoreObject
// 46. StoreObject
func
(
*
StoreObject
)
NEO
MsgCode
()
uint16
{
func
(
*
StoreObject
)
neo
MsgCode
()
uint16
{
return
46
return
46
}
}
func
(
p
*
StoreObject
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
StoreObject
)
neo
MsgEncodedLen
()
int
{
return
57
+
len
(
p
.
Data
)
return
57
+
len
(
p
.
Data
)
}
}
func
(
p
*
StoreObject
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
StoreObject
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Serial
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Serial
))
(
data
[
16
:
])[
0
]
=
bool2byte
(
p
.
Compression
)
(
data
[
16
:
])[
0
]
=
bool2byte
(
p
.
Compression
)
...
@@ -1722,7 +1722,7 @@ func (p *StoreObject) NEOMsgEncode(data []byte) {
...
@@ -1722,7 +1722,7 @@ func (p *StoreObject) NEOMsgEncode(data []byte) {
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
StoreObject
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
StoreObject
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
41
{
if
uint32
(
len
(
data
))
<
41
{
goto
overflow
goto
overflow
...
@@ -1752,19 +1752,19 @@ overflow:
...
@@ -1752,19 +1752,19 @@ overflow:
// 47. AnswerStoreObject
// 47. AnswerStoreObject
func
(
*
AnswerStoreObject
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerStoreObject
)
neo
MsgCode
()
uint16
{
return
47
return
47
}
}
func
(
p
*
AnswerStoreObject
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerStoreObject
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
AnswerStoreObject
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerStoreObject
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Conflict
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Conflict
))
}
}
func
(
p
*
AnswerStoreObject
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerStoreObject
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -1777,15 +1777,15 @@ overflow:
...
@@ -1777,15 +1777,15 @@ overflow:
// 48. AbortTransaction
// 48. AbortTransaction
func
(
*
AbortTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
AbortTransaction
)
neo
MsgCode
()
uint16
{
return
48
return
48
}
}
func
(
p
*
AbortTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AbortTransaction
)
neo
MsgEncodedLen
()
int
{
return
12
+
len
(
p
.
NodeList
)
*
4
return
12
+
len
(
p
.
NodeList
)
*
4
}
}
func
(
p
*
AbortTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AbortTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
{
{
l
:=
uint32
(
len
(
p
.
NodeList
))
l
:=
uint32
(
len
(
p
.
NodeList
))
...
@@ -1799,7 +1799,7 @@ func (p *AbortTransaction) NEOMsgEncode(data []byte) {
...
@@ -1799,7 +1799,7 @@ func (p *AbortTransaction) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AbortTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AbortTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -1827,15 +1827,15 @@ overflow:
...
@@ -1827,15 +1827,15 @@ overflow:
// 49. StoreTransaction
// 49. StoreTransaction
func
(
*
StoreTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
StoreTransaction
)
neo
MsgCode
()
uint16
{
return
49
return
49
}
}
func
(
p
*
StoreTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
StoreTransaction
)
neo
MsgEncodedLen
()
int
{
return
24
+
len
(
p
.
User
)
+
len
(
p
.
Description
)
+
len
(
p
.
Extension
)
+
len
(
p
.
OidList
)
*
8
return
24
+
len
(
p
.
User
)
+
len
(
p
.
Description
)
+
len
(
p
.
Extension
)
+
len
(
p
.
OidList
)
*
8
}
}
func
(
p
*
StoreTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
StoreTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
{
{
l
:=
uint32
(
len
(
p
.
User
))
l
:=
uint32
(
len
(
p
.
User
))
...
@@ -1870,7 +1870,7 @@ func (p *StoreTransaction) NEOMsgEncode(data []byte) {
...
@@ -1870,7 +1870,7 @@ func (p *StoreTransaction) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
StoreTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
StoreTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -1928,19 +1928,19 @@ overflow:
...
@@ -1928,19 +1928,19 @@ overflow:
// 50. VoteTransaction
// 50. VoteTransaction
func
(
*
VoteTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
VoteTransaction
)
neo
MsgCode
()
uint16
{
return
50
return
50
}
}
func
(
p
*
VoteTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
VoteTransaction
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
VoteTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
VoteTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
VoteTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
VoteTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -1953,21 +1953,21 @@ overflow:
...
@@ -1953,21 +1953,21 @@ overflow:
// 51. GetObject
// 51. GetObject
func
(
*
GetObject
)
NEO
MsgCode
()
uint16
{
func
(
*
GetObject
)
neo
MsgCode
()
uint16
{
return
51
return
51
}
}
func
(
p
*
GetObject
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
GetObject
)
neo
MsgEncodedLen
()
int
{
return
24
return
24
}
}
func
(
p
*
GetObject
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
GetObject
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Serial
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Serial
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
GetObject
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
GetObject
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
24
{
if
uint32
(
len
(
data
))
<
24
{
goto
overflow
goto
overflow
}
}
...
@@ -1982,15 +1982,15 @@ overflow:
...
@@ -1982,15 +1982,15 @@ overflow:
// 52. AnswerGetObject
// 52. AnswerGetObject
func
(
*
AnswerGetObject
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerGetObject
)
neo
MsgCode
()
uint16
{
return
52
return
52
}
}
func
(
p
*
AnswerGetObject
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerGetObject
)
neo
MsgEncodedLen
()
int
{
return
57
+
len
(
p
.
Data
)
return
57
+
len
(
p
.
Data
)
}
}
func
(
p
*
AnswerGetObject
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerGetObject
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Serial
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Serial
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
NextSerial
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
NextSerial
))
...
@@ -2006,7 +2006,7 @@ func (p *AnswerGetObject) NEOMsgEncode(data []byte) {
...
@@ -2006,7 +2006,7 @@ func (p *AnswerGetObject) NEOMsgEncode(data []byte) {
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
DataSerial
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
DataSerial
))
}
}
func
(
p
*
AnswerGetObject
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerGetObject
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
49
{
if
uint32
(
len
(
data
))
<
49
{
goto
overflow
goto
overflow
...
@@ -2036,21 +2036,21 @@ overflow:
...
@@ -2036,21 +2036,21 @@ overflow:
// 53. TIDList
// 53. TIDList
func
(
*
TIDList
)
NEO
MsgCode
()
uint16
{
func
(
*
TIDList
)
neo
MsgCode
()
uint16
{
return
53
return
53
}
}
func
(
p
*
TIDList
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
TIDList
)
neo
MsgEncodedLen
()
int
{
return
20
return
20
}
}
func
(
p
*
TIDList
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
TIDList
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
p
.
First
)
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
p
.
First
)
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
p
.
Last
)
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
p
.
Last
)
binary
.
BigEndian
.
PutUint32
(
data
[
16
:
],
p
.
Partition
)
binary
.
BigEndian
.
PutUint32
(
data
[
16
:
],
p
.
Partition
)
}
}
func
(
p
*
TIDList
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
TIDList
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
20
{
if
uint32
(
len
(
data
))
<
20
{
goto
overflow
goto
overflow
}
}
...
@@ -2065,15 +2065,15 @@ overflow:
...
@@ -2065,15 +2065,15 @@ overflow:
// 54. AnswerTIDList
// 54. AnswerTIDList
func
(
*
AnswerTIDList
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerTIDList
)
neo
MsgCode
()
uint16
{
return
54
return
54
}
}
func
(
p
*
AnswerTIDList
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerTIDList
)
neo
MsgEncodedLen
()
int
{
return
4
+
len
(
p
.
TIDList
)
*
8
return
4
+
len
(
p
.
TIDList
)
*
8
}
}
func
(
p
*
AnswerTIDList
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerTIDList
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
TIDList
))
l
:=
uint32
(
len
(
p
.
TIDList
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -2086,7 +2086,7 @@ func (p *AnswerTIDList) NEOMsgEncode(data []byte) {
...
@@ -2086,7 +2086,7 @@ func (p *AnswerTIDList) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerTIDList
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerTIDList
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -2113,22 +2113,22 @@ overflow:
...
@@ -2113,22 +2113,22 @@ overflow:
// 55. TIDListFrom
// 55. TIDListFrom
func
(
*
TIDListFrom
)
NEO
MsgCode
()
uint16
{
func
(
*
TIDListFrom
)
neo
MsgCode
()
uint16
{
return
55
return
55
}
}
func
(
p
*
TIDListFrom
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
TIDListFrom
)
neo
MsgEncodedLen
()
int
{
return
24
return
24
}
}
func
(
p
*
TIDListFrom
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
TIDListFrom
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
MinTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
MinTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MaxTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MaxTID
))
binary
.
BigEndian
.
PutUint32
(
data
[
16
:
],
p
.
Length
)
binary
.
BigEndian
.
PutUint32
(
data
[
16
:
],
p
.
Length
)
binary
.
BigEndian
.
PutUint32
(
data
[
20
:
],
p
.
Partition
)
binary
.
BigEndian
.
PutUint32
(
data
[
20
:
],
p
.
Partition
)
}
}
func
(
p
*
TIDListFrom
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
TIDListFrom
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
24
{
if
uint32
(
len
(
data
))
<
24
{
goto
overflow
goto
overflow
}
}
...
@@ -2144,15 +2144,15 @@ overflow:
...
@@ -2144,15 +2144,15 @@ overflow:
// 56. AnswerTIDListFrom
// 56. AnswerTIDListFrom
func
(
*
AnswerTIDListFrom
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerTIDListFrom
)
neo
MsgCode
()
uint16
{
return
56
return
56
}
}
func
(
p
*
AnswerTIDListFrom
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerTIDListFrom
)
neo
MsgEncodedLen
()
int
{
return
4
+
len
(
p
.
TidList
)
*
8
return
4
+
len
(
p
.
TidList
)
*
8
}
}
func
(
p
*
AnswerTIDListFrom
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerTIDListFrom
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
TidList
))
l
:=
uint32
(
len
(
p
.
TidList
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -2165,7 +2165,7 @@ func (p *AnswerTIDListFrom) NEOMsgEncode(data []byte) {
...
@@ -2165,7 +2165,7 @@ func (p *AnswerTIDListFrom) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerTIDListFrom
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerTIDListFrom
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -2192,19 +2192,19 @@ overflow:
...
@@ -2192,19 +2192,19 @@ overflow:
// 57. TransactionInformation
// 57. TransactionInformation
func
(
*
TransactionInformation
)
NEO
MsgCode
()
uint16
{
func
(
*
TransactionInformation
)
neo
MsgCode
()
uint16
{
return
57
return
57
}
}
func
(
p
*
TransactionInformation
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
TransactionInformation
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
TransactionInformation
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
TransactionInformation
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
TransactionInformation
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
TransactionInformation
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -2217,15 +2217,15 @@ overflow:
...
@@ -2217,15 +2217,15 @@ overflow:
// 58. AnswerTransactionInformation
// 58. AnswerTransactionInformation
func
(
*
AnswerTransactionInformation
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerTransactionInformation
)
neo
MsgCode
()
uint16
{
return
58
return
58
}
}
func
(
p
*
AnswerTransactionInformation
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerTransactionInformation
)
neo
MsgEncodedLen
()
int
{
return
25
+
len
(
p
.
User
)
+
len
(
p
.
Description
)
+
len
(
p
.
Extension
)
+
len
(
p
.
OidList
)
*
8
return
25
+
len
(
p
.
User
)
+
len
(
p
.
Description
)
+
len
(
p
.
Extension
)
+
len
(
p
.
OidList
)
*
8
}
}
func
(
p
*
AnswerTransactionInformation
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerTransactionInformation
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
{
{
l
:=
uint32
(
len
(
p
.
User
))
l
:=
uint32
(
len
(
p
.
User
))
...
@@ -2261,7 +2261,7 @@ func (p *AnswerTransactionInformation) NEOMsgEncode(data []byte) {
...
@@ -2261,7 +2261,7 @@ func (p *AnswerTransactionInformation) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerTransactionInformation
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerTransactionInformation
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -2320,21 +2320,21 @@ overflow:
...
@@ -2320,21 +2320,21 @@ overflow:
// 59. ObjectHistory
// 59. ObjectHistory
func
(
*
ObjectHistory
)
NEO
MsgCode
()
uint16
{
func
(
*
ObjectHistory
)
neo
MsgCode
()
uint16
{
return
59
return
59
}
}
func
(
p
*
ObjectHistory
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
ObjectHistory
)
neo
MsgEncodedLen
()
int
{
return
24
return
24
}
}
func
(
p
*
ObjectHistory
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
ObjectHistory
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
p
.
First
)
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
p
.
First
)
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
p
.
Last
)
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
p
.
Last
)
}
}
func
(
p
*
ObjectHistory
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
ObjectHistory
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
24
{
if
uint32
(
len
(
data
))
<
24
{
goto
overflow
goto
overflow
}
}
...
@@ -2349,15 +2349,15 @@ overflow:
...
@@ -2349,15 +2349,15 @@ overflow:
// 60. AnswerObjectHistory
// 60. AnswerObjectHistory
func
(
*
AnswerObjectHistory
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerObjectHistory
)
neo
MsgCode
()
uint16
{
return
60
return
60
}
}
func
(
p
*
AnswerObjectHistory
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerObjectHistory
)
neo
MsgEncodedLen
()
int
{
return
12
+
len
(
p
.
HistoryList
)
*
12
return
12
+
len
(
p
.
HistoryList
)
*
12
}
}
func
(
p
*
AnswerObjectHistory
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerObjectHistory
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
{
{
l
:=
uint32
(
len
(
p
.
HistoryList
))
l
:=
uint32
(
len
(
p
.
HistoryList
))
...
@@ -2372,7 +2372,7 @@ func (p *AnswerObjectHistory) NEOMsgEncode(data []byte) {
...
@@ -2372,7 +2372,7 @@ func (p *AnswerObjectHistory) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerObjectHistory
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerObjectHistory
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -2404,21 +2404,21 @@ overflow:
...
@@ -2404,21 +2404,21 @@ overflow:
// 61. PartitionList
// 61. PartitionList
func
(
*
PartitionList
)
NEO
MsgCode
()
uint16
{
func
(
*
PartitionList
)
neo
MsgCode
()
uint16
{
return
61
return
61
}
}
func
(
p
*
PartitionList
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
PartitionList
)
neo
MsgEncodedLen
()
int
{
return
12
return
12
}
}
func
(
p
*
PartitionList
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
PartitionList
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
MinOffset
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
MinOffset
)
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
p
.
MaxOffset
)
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
p
.
MaxOffset
)
binary
.
BigEndian
.
PutUint32
(
data
[
8
:
],
uint32
(
int32
(
p
.
NodeUUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
8
:
],
uint32
(
int32
(
p
.
NodeUUID
)))
}
}
func
(
p
*
PartitionList
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
PartitionList
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
}
}
...
@@ -2433,11 +2433,11 @@ overflow:
...
@@ -2433,11 +2433,11 @@ overflow:
// 62. AnswerPartitionList
// 62. AnswerPartitionList
func
(
*
AnswerPartitionList
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerPartitionList
)
neo
MsgCode
()
uint16
{
return
62
return
62
}
}
func
(
p
*
AnswerPartitionList
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerPartitionList
)
neo
MsgEncodedLen
()
int
{
var
size
int
var
size
int
for
i
:=
0
;
i
<
len
(
p
.
RowList
);
i
++
{
for
i
:=
0
;
i
<
len
(
p
.
RowList
);
i
++
{
a
:=
&
p
.
RowList
[
i
]
a
:=
&
p
.
RowList
[
i
]
...
@@ -2446,7 +2446,7 @@ func (p *AnswerPartitionList) NEOMsgEncodedLen() int {
...
@@ -2446,7 +2446,7 @@ func (p *AnswerPartitionList) NEOMsgEncodedLen() int {
return
12
+
len
(
p
.
RowList
)
*
8
+
size
return
12
+
len
(
p
.
RowList
)
*
8
+
size
}
}
func
(
p
*
AnswerPartitionList
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerPartitionList
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
{
{
l
:=
uint32
(
len
(
p
.
RowList
))
l
:=
uint32
(
len
(
p
.
RowList
))
...
@@ -2471,7 +2471,7 @@ func (p *AnswerPartitionList) NEOMsgEncode(data []byte) {
...
@@ -2471,7 +2471,7 @@ func (p *AnswerPartitionList) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerPartitionList
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerPartitionList
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -2513,19 +2513,19 @@ overflow:
...
@@ -2513,19 +2513,19 @@ overflow:
// 63. NodeList
// 63. NodeList
func
(
*
NodeList
)
NEO
MsgCode
()
uint16
{
func
(
*
NodeList
)
neo
MsgCode
()
uint16
{
return
63
return
63
}
}
func
(
p
*
NodeList
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
NodeList
)
neo
MsgEncodedLen
()
int
{
return
4
return
4
}
}
func
(
p
*
NodeList
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
NodeList
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
}
}
func
(
p
*
NodeList
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NodeList
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
}
}
...
@@ -2538,11 +2538,11 @@ overflow:
...
@@ -2538,11 +2538,11 @@ overflow:
// 64. AnswerNodeList
// 64. AnswerNodeList
func
(
*
AnswerNodeList
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerNodeList
)
neo
MsgCode
()
uint16
{
return
64
return
64
}
}
func
(
p
*
AnswerNodeList
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerNodeList
)
neo
MsgEncodedLen
()
int
{
var
size
int
var
size
int
for
i
:=
0
;
i
<
len
(
p
.
NodeList
);
i
++
{
for
i
:=
0
;
i
<
len
(
p
.
NodeList
);
i
++
{
a
:=
&
p
.
NodeList
[
i
]
a
:=
&
p
.
NodeList
[
i
]
...
@@ -2551,7 +2551,7 @@ func (p *AnswerNodeList) NEOMsgEncodedLen() int {
...
@@ -2551,7 +2551,7 @@ func (p *AnswerNodeList) NEOMsgEncodedLen() int {
return
4
+
len
(
p
.
NodeList
)
*
26
+
size
return
4
+
len
(
p
.
NodeList
)
*
26
+
size
}
}
func
(
p
*
AnswerNodeList
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerNodeList
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
NodeList
))
l
:=
uint32
(
len
(
p
.
NodeList
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -2575,7 +2575,7 @@ func (p *AnswerNodeList) NEOMsgEncode(data []byte) {
...
@@ -2575,7 +2575,7 @@ func (p *AnswerNodeList) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerNodeList
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerNodeList
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -2616,20 +2616,20 @@ overflow:
...
@@ -2616,20 +2616,20 @@ overflow:
// 65. SetNodeState
// 65. SetNodeState
func
(
*
SetNodeState
)
NEO
MsgCode
()
uint16
{
func
(
*
SetNodeState
)
neo
MsgCode
()
uint16
{
return
65
return
65
}
}
func
(
p
*
SetNodeState
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
SetNodeState
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
SetNodeState
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
SetNodeState
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeUUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeUUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
NodeState
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
NodeState
)))
}
}
func
(
p
*
SetNodeState
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
SetNodeState
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -2643,15 +2643,15 @@ overflow:
...
@@ -2643,15 +2643,15 @@ overflow:
// 66. AddPendingNodes
// 66. AddPendingNodes
func
(
*
AddPendingNodes
)
NEO
MsgCode
()
uint16
{
func
(
*
AddPendingNodes
)
neo
MsgCode
()
uint16
{
return
66
return
66
}
}
func
(
p
*
AddPendingNodes
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AddPendingNodes
)
neo
MsgEncodedLen
()
int
{
return
4
+
len
(
p
.
NodeList
)
*
4
return
4
+
len
(
p
.
NodeList
)
*
4
}
}
func
(
p
*
AddPendingNodes
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AddPendingNodes
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
NodeList
))
l
:=
uint32
(
len
(
p
.
NodeList
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -2664,7 +2664,7 @@ func (p *AddPendingNodes) NEOMsgEncode(data []byte) {
...
@@ -2664,7 +2664,7 @@ func (p *AddPendingNodes) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AddPendingNodes
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AddPendingNodes
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -2691,15 +2691,15 @@ overflow:
...
@@ -2691,15 +2691,15 @@ overflow:
// 67. TweakPartitionTable
// 67. TweakPartitionTable
func
(
*
TweakPartitionTable
)
NEO
MsgCode
()
uint16
{
func
(
*
TweakPartitionTable
)
neo
MsgCode
()
uint16
{
return
67
return
67
}
}
func
(
p
*
TweakPartitionTable
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
TweakPartitionTable
)
neo
MsgEncodedLen
()
int
{
return
4
+
len
(
p
.
NodeList
)
*
4
return
4
+
len
(
p
.
NodeList
)
*
4
}
}
func
(
p
*
TweakPartitionTable
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
TweakPartitionTable
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
NodeList
))
l
:=
uint32
(
len
(
p
.
NodeList
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -2712,7 +2712,7 @@ func (p *TweakPartitionTable) NEOMsgEncode(data []byte) {
...
@@ -2712,7 +2712,7 @@ func (p *TweakPartitionTable) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
TweakPartitionTable
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
TweakPartitionTable
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -2739,11 +2739,11 @@ overflow:
...
@@ -2739,11 +2739,11 @@ overflow:
// 68. NotifyNodeInformation
// 68. NotifyNodeInformation
func
(
*
NotifyNodeInformation
)
NEO
MsgCode
()
uint16
{
func
(
*
NotifyNodeInformation
)
neo
MsgCode
()
uint16
{
return
68
return
68
}
}
func
(
p
*
NotifyNodeInformation
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
NotifyNodeInformation
)
neo
MsgEncodedLen
()
int
{
var
size
int
var
size
int
for
i
:=
0
;
i
<
len
(
p
.
NodeList
);
i
++
{
for
i
:=
0
;
i
<
len
(
p
.
NodeList
);
i
++
{
a
:=
&
p
.
NodeList
[
i
]
a
:=
&
p
.
NodeList
[
i
]
...
@@ -2752,7 +2752,7 @@ func (p *NotifyNodeInformation) NEOMsgEncodedLen() int {
...
@@ -2752,7 +2752,7 @@ func (p *NotifyNodeInformation) NEOMsgEncodedLen() int {
return
12
+
len
(
p
.
NodeList
)
*
26
+
size
return
12
+
len
(
p
.
NodeList
)
*
26
+
size
}
}
func
(
p
*
NotifyNodeInformation
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
NotifyNodeInformation
)
neo
MsgEncode
(
data
[]
byte
)
{
float64_NEOEncode
(
data
[
0
:
],
p
.
IdTimestamp
)
float64_NEOEncode
(
data
[
0
:
],
p
.
IdTimestamp
)
{
{
l
:=
uint32
(
len
(
p
.
NodeList
))
l
:=
uint32
(
len
(
p
.
NodeList
))
...
@@ -2777,7 +2777,7 @@ func (p *NotifyNodeInformation) NEOMsgEncode(data []byte) {
...
@@ -2777,7 +2777,7 @@ func (p *NotifyNodeInformation) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
NotifyNodeInformation
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotifyNodeInformation
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -2819,36 +2819,36 @@ overflow:
...
@@ -2819,36 +2819,36 @@ overflow:
// 69. NodeInformation
// 69. NodeInformation
func
(
*
NodeInformation
)
NEO
MsgCode
()
uint16
{
func
(
*
NodeInformation
)
neo
MsgCode
()
uint16
{
return
69
return
69
}
}
func
(
p
*
NodeInformation
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
NodeInformation
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
NodeInformation
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
NodeInformation
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
NodeInformation
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NodeInformation
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 70. SetClusterState
// 70. SetClusterState
func
(
*
SetClusterState
)
NEO
MsgCode
()
uint16
{
func
(
*
SetClusterState
)
neo
MsgCode
()
uint16
{
return
70
return
70
}
}
func
(
p
*
SetClusterState
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
SetClusterState
)
neo
MsgEncodedLen
()
int
{
return
4
return
4
}
}
func
(
p
*
SetClusterState
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
SetClusterState
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
State
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
State
)))
}
}
func
(
p
*
SetClusterState
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
SetClusterState
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
}
}
...
@@ -2861,19 +2861,19 @@ overflow:
...
@@ -2861,19 +2861,19 @@ overflow:
// 71. repairFlags
// 71. repairFlags
func
(
*
repairFlags
)
NEO
MsgCode
()
uint16
{
func
(
*
repairFlags
)
neo
MsgCode
()
uint16
{
return
71
return
71
}
}
func
(
p
*
repairFlags
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
repairFlags
)
neo
MsgEncodedLen
()
int
{
return
1
return
1
}
}
func
(
p
*
repairFlags
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
repairFlags
)
neo
MsgEncode
(
data
[]
byte
)
{
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
DryRun
)
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
DryRun
)
}
}
func
(
p
*
repairFlags
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
repairFlags
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
1
{
if
uint32
(
len
(
data
))
<
1
{
goto
overflow
goto
overflow
}
}
...
@@ -2886,15 +2886,15 @@ overflow:
...
@@ -2886,15 +2886,15 @@ overflow:
// 72. Repair
// 72. Repair
func
(
*
Repair
)
NEO
MsgCode
()
uint16
{
func
(
*
Repair
)
neo
MsgCode
()
uint16
{
return
72
return
72
}
}
func
(
p
*
Repair
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
Repair
)
neo
MsgEncodedLen
()
int
{
return
5
+
len
(
p
.
NodeList
)
*
4
return
5
+
len
(
p
.
NodeList
)
*
4
}
}
func
(
p
*
Repair
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
Repair
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
NodeList
))
l
:=
uint32
(
len
(
p
.
NodeList
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -2908,7 +2908,7 @@ func (p *Repair) NEOMsgEncode(data []byte) {
...
@@ -2908,7 +2908,7 @@ func (p *Repair) NEOMsgEncode(data []byte) {
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
repairFlags
.
DryRun
)
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
repairFlags
.
DryRun
)
}
}
func
(
p
*
Repair
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Repair
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -2936,19 +2936,19 @@ overflow:
...
@@ -2936,19 +2936,19 @@ overflow:
// 73. RepairOne
// 73. RepairOne
func
(
*
RepairOne
)
NEO
MsgCode
()
uint16
{
func
(
*
RepairOne
)
neo
MsgCode
()
uint16
{
return
73
return
73
}
}
func
(
p
*
RepairOne
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
RepairOne
)
neo
MsgEncodedLen
()
int
{
return
1
return
1
}
}
func
(
p
*
RepairOne
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
RepairOne
)
neo
MsgEncode
(
data
[]
byte
)
{
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
repairFlags
.
DryRun
)
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
repairFlags
.
DryRun
)
}
}
func
(
p
*
RepairOne
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
RepairOne
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
1
{
if
uint32
(
len
(
data
))
<
1
{
goto
overflow
goto
overflow
}
}
...
@@ -2961,19 +2961,19 @@ overflow:
...
@@ -2961,19 +2961,19 @@ overflow:
// 74. NotifyClusterState
// 74. NotifyClusterState
func
(
*
NotifyClusterState
)
NEO
MsgCode
()
uint16
{
func
(
*
NotifyClusterState
)
neo
MsgCode
()
uint16
{
return
74
return
74
}
}
func
(
p
*
NotifyClusterState
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
NotifyClusterState
)
neo
MsgEncodedLen
()
int
{
return
4
return
4
}
}
func
(
p
*
NotifyClusterState
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
NotifyClusterState
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
State
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
State
)))
}
}
func
(
p
*
NotifyClusterState
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotifyClusterState
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
}
}
...
@@ -2986,36 +2986,36 @@ overflow:
...
@@ -2986,36 +2986,36 @@ overflow:
// 75. AskClusterState
// 75. AskClusterState
func
(
*
AskClusterState
)
NEO
MsgCode
()
uint16
{
func
(
*
AskClusterState
)
neo
MsgCode
()
uint16
{
return
75
return
75
}
}
func
(
p
*
AskClusterState
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AskClusterState
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
AskClusterState
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AskClusterState
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
AskClusterState
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AskClusterState
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 76. AnswerClusterState
// 76. AnswerClusterState
func
(
*
AnswerClusterState
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerClusterState
)
neo
MsgCode
()
uint16
{
return
76
return
76
}
}
func
(
p
*
AnswerClusterState
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerClusterState
)
neo
MsgEncodedLen
()
int
{
return
4
return
4
}
}
func
(
p
*
AnswerClusterState
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerClusterState
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
State
)))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
State
)))
}
}
func
(
p
*
AnswerClusterState
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerClusterState
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
}
}
...
@@ -3028,15 +3028,15 @@ overflow:
...
@@ -3028,15 +3028,15 @@ overflow:
// 77. ObjectUndoSerial
// 77. ObjectUndoSerial
func
(
*
ObjectUndoSerial
)
NEO
MsgCode
()
uint16
{
func
(
*
ObjectUndoSerial
)
neo
MsgCode
()
uint16
{
return
77
return
77
}
}
func
(
p
*
ObjectUndoSerial
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
ObjectUndoSerial
)
neo
MsgEncodedLen
()
int
{
return
28
+
len
(
p
.
OidList
)
*
8
return
28
+
len
(
p
.
OidList
)
*
8
}
}
func
(
p
*
ObjectUndoSerial
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
ObjectUndoSerial
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
UndoneTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
UndoneTID
))
...
@@ -3052,7 +3052,7 @@ func (p *ObjectUndoSerial) NEOMsgEncode(data []byte) {
...
@@ -3052,7 +3052,7 @@ func (p *ObjectUndoSerial) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
ObjectUndoSerial
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
ObjectUndoSerial
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
28
{
if
uint32
(
len
(
data
))
<
28
{
goto
overflow
goto
overflow
...
@@ -3082,15 +3082,15 @@ overflow:
...
@@ -3082,15 +3082,15 @@ overflow:
// 78. AnswerObjectUndoSerial
// 78. AnswerObjectUndoSerial
func
(
*
AnswerObjectUndoSerial
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerObjectUndoSerial
)
neo
MsgCode
()
uint16
{
return
78
return
78
}
}
func
(
p
*
AnswerObjectUndoSerial
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerObjectUndoSerial
)
neo
MsgEncodedLen
()
int
{
return
4
+
len
(
p
.
ObjectTIDDict
)
*
25
return
4
+
len
(
p
.
ObjectTIDDict
)
*
25
}
}
func
(
p
*
AnswerObjectUndoSerial
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerObjectUndoSerial
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
ObjectTIDDict
))
l
:=
uint32
(
len
(
p
.
ObjectTIDDict
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -3110,7 +3110,7 @@ func (p *AnswerObjectUndoSerial) NEOMsgEncode(data []byte) {
...
@@ -3110,7 +3110,7 @@ func (p *AnswerObjectUndoSerial) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
AnswerObjectUndoSerial
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerObjectUndoSerial
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -3150,21 +3150,21 @@ overflow:
...
@@ -3150,21 +3150,21 @@ overflow:
// 79. CheckCurrentSerial
// 79. CheckCurrentSerial
func
(
*
CheckCurrentSerial
)
NEO
MsgCode
()
uint16
{
func
(
*
CheckCurrentSerial
)
neo
MsgCode
()
uint16
{
return
79
return
79
}
}
func
(
p
*
CheckCurrentSerial
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
CheckCurrentSerial
)
neo
MsgEncodedLen
()
int
{
return
24
return
24
}
}
func
(
p
*
CheckCurrentSerial
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
CheckCurrentSerial
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
Serial
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
Serial
))
}
}
func
(
p
*
CheckCurrentSerial
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CheckCurrentSerial
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
24
{
if
uint32
(
len
(
data
))
<
24
{
goto
overflow
goto
overflow
}
}
...
@@ -3179,19 +3179,19 @@ overflow:
...
@@ -3179,19 +3179,19 @@ overflow:
// 80. Pack
// 80. Pack
func
(
*
Pack
)
NEO
MsgCode
()
uint16
{
func
(
*
Pack
)
neo
MsgCode
()
uint16
{
return
80
return
80
}
}
func
(
p
*
Pack
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
Pack
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
Pack
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
Pack
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
Pack
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Pack
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -3204,19 +3204,19 @@ overflow:
...
@@ -3204,19 +3204,19 @@ overflow:
// 81. AnswerPack
// 81. AnswerPack
func
(
*
AnswerPack
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerPack
)
neo
MsgCode
()
uint16
{
return
81
return
81
}
}
func
(
p
*
AnswerPack
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerPack
)
neo
MsgEncodedLen
()
int
{
return
1
return
1
}
}
func
(
p
*
AnswerPack
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerPack
)
neo
MsgEncode
(
data
[]
byte
)
{
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
Status
)
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
Status
)
}
}
func
(
p
*
AnswerPack
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerPack
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
1
{
if
uint32
(
len
(
data
))
<
1
{
goto
overflow
goto
overflow
}
}
...
@@ -3229,15 +3229,15 @@ overflow:
...
@@ -3229,15 +3229,15 @@ overflow:
// 82. CheckReplicas
// 82. CheckReplicas
func
(
*
CheckReplicas
)
NEO
MsgCode
()
uint16
{
func
(
*
CheckReplicas
)
neo
MsgCode
()
uint16
{
return
82
return
82
}
}
func
(
p
*
CheckReplicas
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
CheckReplicas
)
neo
MsgEncodedLen
()
int
{
return
20
+
len
(
p
.
PartitionDict
)
*
8
return
20
+
len
(
p
.
PartitionDict
)
*
8
}
}
func
(
p
*
CheckReplicas
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
CheckReplicas
)
neo
MsgEncode
(
data
[]
byte
)
{
{
{
l
:=
uint32
(
len
(
p
.
PartitionDict
))
l
:=
uint32
(
len
(
p
.
PartitionDict
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
@@ -3257,7 +3257,7 @@ func (p *CheckReplicas) NEOMsgEncode(data []byte) {
...
@@ -3257,7 +3257,7 @@ func (p *CheckReplicas) NEOMsgEncode(data []byte) {
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MaxTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MaxTID
))
}
}
func
(
p
*
CheckReplicas
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CheckReplicas
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
goto
overflow
...
@@ -3287,15 +3287,15 @@ overflow:
...
@@ -3287,15 +3287,15 @@ overflow:
// 83. CheckPartition
// 83. CheckPartition
func
(
*
CheckPartition
)
NEO
MsgCode
()
uint16
{
func
(
*
CheckPartition
)
neo
MsgCode
()
uint16
{
return
83
return
83
}
}
func
(
p
*
CheckPartition
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
CheckPartition
)
neo
MsgEncodedLen
()
int
{
return
30
+
len
(
p
.
Source
.
UpstreamName
)
+
len
(
p
.
Source
.
Address
.
Host
)
return
30
+
len
(
p
.
Source
.
UpstreamName
)
+
len
(
p
.
Source
.
Address
.
Host
)
}
}
func
(
p
*
CheckPartition
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
CheckPartition
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
{
{
l
:=
uint32
(
len
(
p
.
Source
.
UpstreamName
))
l
:=
uint32
(
len
(
p
.
Source
.
UpstreamName
))
...
@@ -3316,7 +3316,7 @@ func (p *CheckPartition) NEOMsgEncode(data []byte) {
...
@@ -3316,7 +3316,7 @@ func (p *CheckPartition) NEOMsgEncode(data []byte) {
binary
.
BigEndian
.
PutUint64
(
data
[
10
:
],
uint64
(
p
.
MaxTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
10
:
],
uint64
(
p
.
MaxTID
))
}
}
func
(
p
*
CheckPartition
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CheckPartition
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
...
@@ -3353,22 +3353,22 @@ overflow:
...
@@ -3353,22 +3353,22 @@ overflow:
// 84. CheckTIDRange
// 84. CheckTIDRange
func
(
*
CheckTIDRange
)
NEO
MsgCode
()
uint16
{
func
(
*
CheckTIDRange
)
neo
MsgCode
()
uint16
{
return
84
return
84
}
}
func
(
p
*
CheckTIDRange
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
CheckTIDRange
)
neo
MsgEncodedLen
()
int
{
return
24
return
24
}
}
func
(
p
*
CheckTIDRange
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
CheckTIDRange
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
p
.
Length
)
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
p
.
Length
)
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MinTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MinTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
MaxTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
16
:
],
uint64
(
p
.
MaxTID
))
}
}
func
(
p
*
CheckTIDRange
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CheckTIDRange
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
24
{
if
uint32
(
len
(
data
))
<
24
{
goto
overflow
goto
overflow
}
}
...
@@ -3384,21 +3384,21 @@ overflow:
...
@@ -3384,21 +3384,21 @@ overflow:
// 85. AnswerCheckTIDRange
// 85. AnswerCheckTIDRange
func
(
*
AnswerCheckTIDRange
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerCheckTIDRange
)
neo
MsgCode
()
uint16
{
return
85
return
85
}
}
func
(
p
*
AnswerCheckTIDRange
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerCheckTIDRange
)
neo
MsgEncodedLen
()
int
{
return
32
return
32
}
}
func
(
p
*
AnswerCheckTIDRange
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerCheckTIDRange
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Count
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Count
)
copy
(
data
[
4
:
],
p
.
Checksum
[
:
])
copy
(
data
[
4
:
],
p
.
Checksum
[
:
])
binary
.
BigEndian
.
PutUint64
(
data
[
24
:
],
uint64
(
p
.
MaxTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
24
:
],
uint64
(
p
.
MaxTID
))
}
}
func
(
p
*
AnswerCheckTIDRange
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerCheckTIDRange
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
32
{
if
uint32
(
len
(
data
))
<
32
{
goto
overflow
goto
overflow
}
}
...
@@ -3413,15 +3413,15 @@ overflow:
...
@@ -3413,15 +3413,15 @@ overflow:
// 86. CheckSerialRange
// 86. CheckSerialRange
func
(
*
CheckSerialRange
)
NEO
MsgCode
()
uint16
{
func
(
*
CheckSerialRange
)
neo
MsgCode
()
uint16
{
return
86
return
86
}
}
func
(
p
*
CheckSerialRange
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
CheckSerialRange
)
neo
MsgEncodedLen
()
int
{
return
32
return
32
}
}
func
(
p
*
CheckSerialRange
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
CheckSerialRange
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
p
.
Length
)
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
p
.
Length
)
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MinTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MinTID
))
...
@@ -3429,7 +3429,7 @@ func (p *CheckSerialRange) NEOMsgEncode(data []byte) {
...
@@ -3429,7 +3429,7 @@ func (p *CheckSerialRange) NEOMsgEncode(data []byte) {
binary
.
BigEndian
.
PutUint64
(
data
[
24
:
],
uint64
(
p
.
MinOID
))
binary
.
BigEndian
.
PutUint64
(
data
[
24
:
],
uint64
(
p
.
MinOID
))
}
}
func
(
p
*
CheckSerialRange
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CheckSerialRange
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
32
{
if
uint32
(
len
(
data
))
<
32
{
goto
overflow
goto
overflow
}
}
...
@@ -3446,15 +3446,15 @@ overflow:
...
@@ -3446,15 +3446,15 @@ overflow:
// 87. AnswerCheckSerialRange
// 87. AnswerCheckSerialRange
func
(
*
AnswerCheckSerialRange
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerCheckSerialRange
)
neo
MsgCode
()
uint16
{
return
87
return
87
}
}
func
(
p
*
AnswerCheckSerialRange
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerCheckSerialRange
)
neo
MsgEncodedLen
()
int
{
return
60
return
60
}
}
func
(
p
*
AnswerCheckSerialRange
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerCheckSerialRange
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Count
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Count
)
copy
(
data
[
4
:
],
p
.
TidChecksum
[
:
])
copy
(
data
[
4
:
],
p
.
TidChecksum
[
:
])
binary
.
BigEndian
.
PutUint64
(
data
[
24
:
],
uint64
(
p
.
MaxTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
24
:
],
uint64
(
p
.
MaxTID
))
...
@@ -3462,7 +3462,7 @@ func (p *AnswerCheckSerialRange) NEOMsgEncode(data []byte) {
...
@@ -3462,7 +3462,7 @@ func (p *AnswerCheckSerialRange) NEOMsgEncode(data []byte) {
binary
.
BigEndian
.
PutUint64
(
data
[
52
:
],
uint64
(
p
.
MaxOID
))
binary
.
BigEndian
.
PutUint64
(
data
[
52
:
],
uint64
(
p
.
MaxOID
))
}
}
func
(
p
*
AnswerCheckSerialRange
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerCheckSerialRange
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
60
{
if
uint32
(
len
(
data
))
<
60
{
goto
overflow
goto
overflow
}
}
...
@@ -3479,15 +3479,15 @@ overflow:
...
@@ -3479,15 +3479,15 @@ overflow:
// 88. PartitionCorrupted
// 88. PartitionCorrupted
func
(
*
PartitionCorrupted
)
NEO
MsgCode
()
uint16
{
func
(
*
PartitionCorrupted
)
neo
MsgCode
()
uint16
{
return
88
return
88
}
}
func
(
p
*
PartitionCorrupted
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
PartitionCorrupted
)
neo
MsgEncodedLen
()
int
{
return
8
+
len
(
p
.
CellList
)
*
4
return
8
+
len
(
p
.
CellList
)
*
4
}
}
func
(
p
*
PartitionCorrupted
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
PartitionCorrupted
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
{
{
l
:=
uint32
(
len
(
p
.
CellList
))
l
:=
uint32
(
len
(
p
.
CellList
))
...
@@ -3501,7 +3501,7 @@ func (p *PartitionCorrupted) NEOMsgEncode(data []byte) {
...
@@ -3501,7 +3501,7 @@ func (p *PartitionCorrupted) NEOMsgEncode(data []byte) {
}
}
}
}
func
(
p
*
PartitionCorrupted
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
PartitionCorrupted
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
var
nread
uint32
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
...
@@ -3529,36 +3529,36 @@ overflow:
...
@@ -3529,36 +3529,36 @@ overflow:
// 89. LastTransaction
// 89. LastTransaction
func
(
*
LastTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
LastTransaction
)
neo
MsgCode
()
uint16
{
return
89
return
89
}
}
func
(
p
*
LastTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
LastTransaction
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
LastTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
LastTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
LastTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
LastTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
// 90. AnswerLastTransaction
// 90. AnswerLastTransaction
func
(
*
AnswerLastTransaction
)
NEO
MsgCode
()
uint16
{
func
(
*
AnswerLastTransaction
)
neo
MsgCode
()
uint16
{
return
90
return
90
}
}
func
(
p
*
AnswerLastTransaction
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
AnswerLastTransaction
)
neo
MsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
AnswerLastTransaction
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
AnswerLastTransaction
)
neo
MsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
}
}
func
(
p
*
AnswerLastTransaction
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerLastTransaction
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -3571,18 +3571,18 @@ overflow:
...
@@ -3571,18 +3571,18 @@ overflow:
// 91. NotifyReady
// 91. NotifyReady
func
(
*
NotifyReady
)
NEO
MsgCode
()
uint16
{
func
(
*
NotifyReady
)
neo
MsgCode
()
uint16
{
return
91
return
91
}
}
func
(
p
*
NotifyReady
)
NEO
MsgEncodedLen
()
int
{
func
(
p
*
NotifyReady
)
neo
MsgEncodedLen
()
int
{
return
0
return
0
}
}
func
(
p
*
NotifyReady
)
NEO
MsgEncode
(
data
[]
byte
)
{
func
(
p
*
NotifyReady
)
neo
MsgEncode
(
data
[]
byte
)
{
}
}
func
(
p
*
NotifyReady
)
NEO
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotifyReady
)
neo
MsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
return
0
,
nil
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment