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
049293ed
Commit
049293ed
authored
Jan 19, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5108bb3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
176 additions
and
176 deletions
+176
-176
t/neo/marshal.go
t/neo/marshal.go
+174
-174
t/neo/protogen.go
t/neo/protogen.go
+2
-2
No files found.
t/neo/marshal.go
View file @
049293ed
...
...
@@ -8,14 +8,14 @@ import (
// 0. Address
func
(
p
*
Address
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Address
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO strbytes
binary
.
BigEndian
.
PutUint16
(
data
[
0
:
],
p
.
Port
)
return
int
(
nwrote
)
+
2
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
Address
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -38,7 +38,7 @@ overflow:
// 1. NodeInfo
func
(
p
*
NodeInfo
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NodeInfo
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
// TODO strbytes
...
...
@@ -49,7 +49,7 @@ func (p *NodeInfo) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
22
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
NodeInfo
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -76,14 +76,14 @@ overflow:
// 2. CellInfo
func
(
p
*
CellInfo
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CellInfo
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
UUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
CellState
)))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
CellInfo
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -97,14 +97,14 @@ overflow:
// 3. RowInfo
func
(
p
*
RowInfo
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
RowInfo
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Offset
)
// TODO slice
return
int
(
nwrote
)
+
4
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
RowInfo
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -130,13 +130,13 @@ overflow:
// 4. Notify
func
(
p
*
Notify
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Notify
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO strbytes
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
Notify
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -158,14 +158,14 @@ overflow:
// 5. Error
func
(
p
*
Error
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Error
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Code
)
// TODO strbytes
return
int
(
nwrote
)
+
4
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
Error
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -188,12 +188,12 @@ overflow:
// 6. Ping
func
(
p
*
Ping
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Ping
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
Ping
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -205,12 +205,12 @@ overflow:
// 7. CloseClient
func
(
p
*
CloseClient
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CloseClient
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
CloseClient
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -222,7 +222,7 @@ overflow:
// 8. RequestIdentification
func
(
p
*
RequestIdentification
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
RequestIdentification
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
ProtocolVersion
)
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
NodeType
)))
...
...
@@ -234,7 +234,7 @@ func (p *RequestIdentification) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
22
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
RequestIdentification
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -271,7 +271,7 @@ overflow:
// 9. AcceptIdentification
func
(
p
*
AcceptIdentification
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AcceptIdentification
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
MyUUID
)))
...
...
@@ -284,7 +284,7 @@ func (p *AcceptIdentification) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
22
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AcceptIdentification
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -338,12 +338,12 @@ overflow:
// 10. PrimaryMaster
func
(
p
*
PrimaryMaster
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
PrimaryMaster
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
PrimaryMaster
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -355,13 +355,13 @@ overflow:
// 11. AnswerPrimary
func
(
p
*
AnswerPrimary
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerPrimary
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
PrimaryUUID
)))
return
int
(
nwrote
)
+
4
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerPrimary
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -374,12 +374,12 @@ overflow:
// 12. AnnouncePrimary
func
(
p
*
AnnouncePrimary
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnnouncePrimary
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnnouncePrimary
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -391,12 +391,12 @@ overflow:
// 13. ReelectPrimary
func
(
p
*
ReelectPrimary
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
ReelectPrimary
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
ReelectPrimary
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -408,12 +408,12 @@ overflow:
// 14. Recovery
func
(
p
*
Recovery
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Recovery
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
Recovery
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -425,7 +425,7 @@ overflow:
// 15. AnswerRecovery
func
(
p
*
AnswerRecovery
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerRecovery
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
BackupTID
))
...
...
@@ -433,7 +433,7 @@ func (p *AnswerRecovery) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
24
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerRecovery
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -448,12 +448,12 @@ overflow:
// 16. LastIDs
func
(
p
*
LastIDs
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
LastIDs
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
LastIDs
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -465,14 +465,14 @@ overflow:
// 17. AnswerLastIDs
func
(
p
*
AnswerLastIDs
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerLastIDs
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
LastOID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LastTID
))
return
int
(
nwrote
)
+
16
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerLastIDs
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -486,12 +486,12 @@ overflow:
// 18. PartitionTable
func
(
p
*
PartitionTable
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
PartitionTable
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
PartitionTable
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -503,14 +503,14 @@ overflow:
// 19. AnswerPartitionTable
func
(
p
*
AnswerPartitionTable
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerPartitionTable
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
// TODO slice
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerPartitionTable
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -548,14 +548,14 @@ overflow:
// 20. NotifyPartitionTable
func
(
p
*
NotifyPartitionTable
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotifyPartitionTable
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
// TODO slice
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
NotifyPartitionTable
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -593,14 +593,14 @@ overflow:
// 21. PartitionChanges
func
(
p
*
PartitionChanges
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
PartitionChanges
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
// TODO slice
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
PartitionChanges
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -631,13 +631,13 @@ overflow:
// 22. StartOperation
func
(
p
*
StartOperation
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
StartOperation
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
Backup
)
return
int
(
nwrote
)
+
1
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
StartOperation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -650,12 +650,12 @@ overflow:
// 23. StopOperation
func
(
p
*
StopOperation
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
StopOperation
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
StopOperation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -667,12 +667,12 @@ overflow:
// 24. UnfinishedTransactions
func
(
p
*
UnfinishedTransactions
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
UnfinishedTransactions
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
UnfinishedTransactions
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -684,14 +684,14 @@ overflow:
// 25. AnswerUnfinishedTransactions
func
(
p
*
AnswerUnfinishedTransactions
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerUnfinishedTransactions
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
MaxTID
))
// TODO slice
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerUnfinishedTransactions
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -716,12 +716,12 @@ overflow:
// 26. LockedTransactions
func
(
p
*
LockedTransactions
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
LockedTransactions
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
LockedTransactions
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -733,13 +733,13 @@ overflow:
// 27. AnswerLockedTransactions
func
(
p
*
AnswerLockedTransactions
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerLockedTransactions
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO map
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerLockedTransactions
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -764,13 +764,13 @@ overflow:
// 28. FinalTID
func
(
p
*
FinalTID
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
FinalTID
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
FinalTID
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -783,13 +783,13 @@ overflow:
// 29. AnswerFinalTID
func
(
p
*
AnswerFinalTID
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerFinalTID
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerFinalTID
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -802,14 +802,14 @@ overflow:
// 30. ValidateTransaction
func
(
p
*
ValidateTransaction
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
ValidateTransaction
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
16
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
ValidateTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -823,13 +823,13 @@ overflow:
// 31. BeginTransaction
func
(
p
*
BeginTransaction
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
BeginTransaction
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
BeginTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -842,13 +842,13 @@ overflow:
// 32. AnswerBeginTransaction
func
(
p
*
AnswerBeginTransaction
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerBeginTransaction
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerBeginTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -861,7 +861,7 @@ overflow:
// 33. FinishTransaction
func
(
p
*
FinishTransaction
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
FinishTransaction
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
// TODO slice
...
...
@@ -869,7 +869,7 @@ func (p *FinishTransaction) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
FinishTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -906,14 +906,14 @@ overflow:
// 34. AnswerFinishTransaction
func
(
p
*
AnswerFinishTransaction
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerFinishTransaction
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
16
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerFinishTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -927,14 +927,14 @@ overflow:
// 35. NotifyTransactionFinished
func
(
p
*
NotifyTransactionFinished
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotifyTransactionFinished
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MaxTID
))
return
int
(
nwrote
)
+
16
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
NotifyTransactionFinished
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -948,14 +948,14 @@ overflow:
// 36. LockInformation
func
(
p
*
LockInformation
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
LockInformation
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Ttid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
16
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
LockInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -969,13 +969,13 @@ overflow:
// 37. AnswerLockInformation
func
(
p
*
AnswerLockInformation
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerLockInformation
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Ttid
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerLockInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -988,14 +988,14 @@ overflow:
// 38. InvalidateObjects
func
(
p
*
InvalidateObjects
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
InvalidateObjects
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
// TODO slice
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
InvalidateObjects
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1020,13 +1020,13 @@ overflow:
// 39. UnlockInformation
func
(
p
*
UnlockInformation
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
UnlockInformation
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
UnlockInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1039,13 +1039,13 @@ overflow:
// 40. GenerateOIDs
func
(
p
*
GenerateOIDs
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
GenerateOIDs
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
NumOIDs
)
return
int
(
nwrote
)
+
4
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
GenerateOIDs
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1058,13 +1058,13 @@ overflow:
// 41. AnswerGenerateOIDs
func
(
p
*
AnswerGenerateOIDs
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerGenerateOIDs
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO slice
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerGenerateOIDs
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1088,7 +1088,7 @@ overflow:
// 42. StoreObject
func
(
p
*
StoreObject
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
StoreObject
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Serial
))
...
...
@@ -1120,7 +1120,7 @@ func (p *StoreObject) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
54
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
StoreObject
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1170,7 +1170,7 @@ overflow:
// 43. AnswerStoreObject
func
(
p
*
AnswerStoreObject
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerStoreObject
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
Conflicting
)
binary
.
BigEndian
.
PutUint64
(
data
[
1
:
],
uint64
(
p
.
Oid
))
...
...
@@ -1178,7 +1178,7 @@ func (p *AnswerStoreObject) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
17
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerStoreObject
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1193,13 +1193,13 @@ overflow:
// 44. AbortTransaction
func
(
p
*
AbortTransaction
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AbortTransaction
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AbortTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1212,7 +1212,7 @@ overflow:
// 45. StoreTransaction
func
(
p
*
StoreTransaction
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
StoreTransaction
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
// TODO strbytes
...
...
@@ -1222,7 +1222,7 @@ func (p *StoreTransaction) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
StoreTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1277,13 +1277,13 @@ overflow:
// 46. VoteTransaction
func
(
p
*
VoteTransaction
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
VoteTransaction
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
VoteTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1296,7 +1296,7 @@ overflow:
// 47. GetObject
func
(
p
*
GetObject
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
GetObject
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Serial
))
...
...
@@ -1304,7 +1304,7 @@ func (p *GetObject) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
24
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
GetObject
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1319,7 +1319,7 @@ overflow:
// 48. AnswerGetObject
func
(
p
*
AnswerGetObject
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerGetObject
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
SerialStart
))
...
...
@@ -1350,7 +1350,7 @@ func (p *AnswerGetObject) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
53
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerGetObject
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1399,7 +1399,7 @@ overflow:
// 49. TIDList
func
(
p
*
TIDList
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
TIDList
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
p
.
First
)
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
p
.
Last
)
...
...
@@ -1407,7 +1407,7 @@ func (p *TIDList) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
20
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
TIDList
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1422,13 +1422,13 @@ overflow:
// 50. AnswerTIDList
func
(
p
*
AnswerTIDList
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerTIDList
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO slice
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerTIDList
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1452,7 +1452,7 @@ overflow:
// 51. TIDListFrom
func
(
p
*
TIDListFrom
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
TIDListFrom
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
MinTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
MaxTID
))
...
...
@@ -1461,7 +1461,7 @@ func (p *TIDListFrom) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
24
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
TIDListFrom
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1477,13 +1477,13 @@ overflow:
// 52. AnswerTIDListFrom
func
(
p
*
AnswerTIDListFrom
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerTIDListFrom
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO slice
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerTIDListFrom
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1507,13 +1507,13 @@ overflow:
// 53. TransactionInformation
func
(
p
*
TransactionInformation
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
TransactionInformation
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
TransactionInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1526,7 +1526,7 @@ overflow:
// 54. AnswerTransactionInformation
func
(
p
*
AnswerTransactionInformation
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerTransactionInformation
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
// TODO strbytes
...
...
@@ -1537,7 +1537,7 @@ func (p *AnswerTransactionInformation) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
9
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerTransactionInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1593,7 +1593,7 @@ overflow:
// 55. ObjectHistory
func
(
p
*
ObjectHistory
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
ObjectHistory
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
p
.
First
)
...
...
@@ -1601,7 +1601,7 @@ func (p *ObjectHistory) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
24
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
ObjectHistory
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1616,14 +1616,14 @@ overflow:
// 56. AnswerObjectHistory
func
(
p
*
AnswerObjectHistory
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerObjectHistory
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
// TODO slice
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerObjectHistory
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1652,7 +1652,7 @@ overflow:
// 57. PartitionList
func
(
p
*
PartitionList
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
PartitionList
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
MinOffset
)
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
p
.
MaxOffset
)
...
...
@@ -1660,7 +1660,7 @@ func (p *PartitionList) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
12
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
PartitionList
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1675,14 +1675,14 @@ overflow:
// 58. AnswerPartitionList
func
(
p
*
AnswerPartitionList
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerPartitionList
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
// TODO slice
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerPartitionList
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1720,13 +1720,13 @@ overflow:
// 59. X_NodeList
func
(
p
*
X_NodeList
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
X_NodeList
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
NodeType
)))
return
int
(
nwrote
)
+
4
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
X_NodeList
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1739,13 +1739,13 @@ overflow:
// 60. AnswerNodeList
func
(
p
*
AnswerNodeList
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerNodeList
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO slice
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerNodeList
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1783,14 +1783,14 @@ overflow:
// 61. SetNodeState
func
(
p
*
SetNodeState
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
SetNodeState
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
UUID
)))
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
uint32
(
int32
(
p
.
NodeState
)))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
SetNodeState
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1804,13 +1804,13 @@ overflow:
// 62. AddPendingNodes
func
(
p
*
AddPendingNodes
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AddPendingNodes
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO slice
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AddPendingNodes
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1834,13 +1834,13 @@ overflow:
// 63. TweakPartitionTable
func
(
p
*
TweakPartitionTable
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
TweakPartitionTable
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO slice
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
TweakPartitionTable
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1864,13 +1864,13 @@ overflow:
// 64. NotifyNodeInformation
func
(
p
*
NotifyNodeInformation
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotifyNodeInformation
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO slice
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
NotifyNodeInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1908,12 +1908,12 @@ overflow:
// 65. NodeInformation
func
(
p
*
NodeInformation
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NodeInformation
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
NodeInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1925,13 +1925,13 @@ overflow:
// 66. SetClusterState
func
(
p
*
SetClusterState
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
SetClusterState
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
State
)))
return
int
(
nwrote
)
+
4
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
SetClusterState
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1944,13 +1944,13 @@ overflow:
// 67. ClusterInformation
func
(
p
*
ClusterInformation
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
ClusterInformation
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
State
)))
return
int
(
nwrote
)
+
4
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
ClusterInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1963,13 +1963,13 @@ overflow:
// 68. X_ClusterState
func
(
p
*
X_ClusterState
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
X_ClusterState
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
uint32
(
int32
(
p
.
State
)))
return
int
(
nwrote
)
+
4
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
X_ClusterState
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -1982,7 +1982,7 @@ overflow:
// 69. ObjectUndoSerial
func
(
p
*
ObjectUndoSerial
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
ObjectUndoSerial
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LTID
))
...
...
@@ -1991,7 +1991,7 @@ func (p *ObjectUndoSerial) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
24
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
ObjectUndoSerial
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2018,13 +2018,13 @@ overflow:
// 70. AnswerObjectUndoSerial
func
(
p
*
AnswerObjectUndoSerial
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerObjectUndoSerial
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO map
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerObjectUndoSerial
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2061,14 +2061,14 @@ overflow:
// 71. HasLock
func
(
p
*
HasLock
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
HasLock
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Oid
))
return
int
(
nwrote
)
+
16
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
HasLock
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2082,14 +2082,14 @@ overflow:
// 72. AnswerHasLock
func
(
p
*
AnswerHasLock
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerHasLock
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Oid
))
binary
.
BigEndian
.
PutUint32
(
data
[
8
:
],
uint32
(
int32
(
p
.
LockState
)))
return
int
(
nwrote
)
+
12
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerHasLock
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2103,7 +2103,7 @@ overflow:
// 73. CheckCurrentSerial
func
(
p
*
CheckCurrentSerial
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CheckCurrentSerial
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Serial
))
...
...
@@ -2111,7 +2111,7 @@ func (p *CheckCurrentSerial) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
24
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
CheckCurrentSerial
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2126,7 +2126,7 @@ overflow:
// 74. AnswerCheckCurrentSerial
func
(
p
*
AnswerCheckCurrentSerial
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerCheckCurrentSerial
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
Conflicting
)
binary
.
BigEndian
.
PutUint64
(
data
[
1
:
],
uint64
(
p
.
Oid
))
...
...
@@ -2134,7 +2134,7 @@ func (p *AnswerCheckCurrentSerial) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
17
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerCheckCurrentSerial
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2149,13 +2149,13 @@ overflow:
// 75. Pack
func
(
p
*
Pack
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Pack
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
Pack
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2168,13 +2168,13 @@ overflow:
// 76. AnswerPack
func
(
p
*
AnswerPack
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerPack
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
(
data
[
0
:
])[
0
]
=
bool2byte
(
p
.
Status
)
return
int
(
nwrote
)
+
1
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerPack
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2187,7 +2187,7 @@ overflow:
// 77. CheckReplicas
func
(
p
*
CheckReplicas
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CheckReplicas
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
// TODO map
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
MinTID
))
...
...
@@ -2195,7 +2195,7 @@ func (p *CheckReplicas) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
16
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
CheckReplicas
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2222,7 +2222,7 @@ overflow:
// 78. CheckPartition
func
(
p
*
CheckPartition
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CheckPartition
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
// TODO strbytes
...
...
@@ -2233,7 +2233,7 @@ func (p *CheckPartition) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
22
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
CheckPartition
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2269,7 +2269,7 @@ overflow:
// 79. CheckTIDRange
func
(
p
*
CheckTIDRange
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CheckTIDRange
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
p
.
Length
)
...
...
@@ -2278,7 +2278,7 @@ func (p *CheckTIDRange) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
24
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
CheckTIDRange
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2294,7 +2294,7 @@ overflow:
// 80. AnswerCheckTIDRange
func
(
p
*
AnswerCheckTIDRange
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerCheckTIDRange
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Count
)
(
data
[
4
:
])[
0
]
=
p
.
Checksum
[
0
]
...
...
@@ -2321,7 +2321,7 @@ func (p *AnswerCheckTIDRange) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
32
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerCheckTIDRange
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2355,7 +2355,7 @@ overflow:
// 81. CheckSerialRange
func
(
p
*
CheckSerialRange
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
CheckSerialRange
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
binary
.
BigEndian
.
PutUint32
(
data
[
4
:
],
p
.
Length
)
...
...
@@ -2365,7 +2365,7 @@ func (p *CheckSerialRange) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
32
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
CheckSerialRange
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2382,7 +2382,7 @@ overflow:
// 82. AnswerCheckSerialRange
func
(
p
*
AnswerCheckSerialRange
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerCheckSerialRange
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Count
)
(
data
[
4
:
])[
0
]
=
p
.
TidChecksum
[
0
]
...
...
@@ -2430,7 +2430,7 @@ func (p *AnswerCheckSerialRange) NEOEncode(data []byte) (int, error) {
return
int
(
nwrote
)
+
60
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerCheckSerialRange
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2485,14 +2485,14 @@ overflow:
// 83. PartitionCorrupted
func
(
p
*
PartitionCorrupted
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
PartitionCorrupted
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
Partition
)
// TODO slice
return
int
(
nwrote
)
+
4
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
PartitionCorrupted
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2517,12 +2517,12 @@ overflow:
// 84. LastTransaction
func
(
p
*
LastTransaction
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
LastTransaction
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
LastTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2534,13 +2534,13 @@ overflow:
// 85. AnswerLastTransaction
func
(
p
*
AnswerLastTransaction
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AnswerLastTransaction
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Tid
))
return
int
(
nwrote
)
+
8
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
AnswerLastTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
@@ -2553,12 +2553,12 @@ overflow:
// 86. NotifyReady
func
(
p
*
NotifyReady
)
NEOEncode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
NotifyReady
)
NEOEncode
(
data
[]
byte
)
int
/*(int, error)*/
{
var
nwrote
uint32
return
int
(
nwrote
)
+
0
/*, nil*/
overflow
:
panic
(
)
//return 0, ErrDe
codeOverflow
panic
(
0
)
//return 0, ErrEn
codeOverflow
}
func
(
p
*
NotifyReady
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
...
...
t/neo/protogen.go
View file @
049293ed
...
...
@@ -213,7 +213,7 @@ func (d *decoder) generatedCode() string {
}
func
(
e
*
encoder
)
genPrologue
(
recvName
,
typeName
string
)
{
e
.
emit
(
"func (%s *%s) NEOEncode(data []byte)
(int, error)
{"
,
recvName
,
typeName
)
e
.
emit
(
"func (%s *%s) NEOEncode(data []byte)
int /*(int, error)*/
{"
,
recvName
,
typeName
)
e
.
emit
(
"var nwrote uint32"
)
}
...
...
@@ -225,7 +225,7 @@ func (d *decoder) genPrologue(recvName, typeName string) {
func
(
e
*
encoder
)
genEpilogue
()
{
e
.
emit
(
"return int(nwrote) + %v /*, nil*/"
,
e
.
n
)
e
.
emit
(
"
\n
overflow:"
)
e
.
emit
(
"panic(
) //return 0, ErrDe
codeOverflow"
)
e
.
emit
(
"panic(
0) //return 0, ErrEn
codeOverflow"
)
e
.
emit
(
"}"
)
}
...
...
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