Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
776e85be
Commit
776e85be
authored
Sep 03, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3e4d0dd7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
215 additions
and
203 deletions
+215
-203
go/neo/proto.go
go/neo/proto.go
+9
-5
go/neo/zproto-marshal.go
go/neo/zproto-marshal.go
+206
-198
No files found.
go/neo/proto.go
View file @
776e85be
...
...
@@ -491,12 +491,15 @@ type NotifyTransactionFinished struct {
MaxTID
zodb
.
Tid
}
// XXX move vvv
/*
// Lock information on a transaction. PM -> S.
// Notify information on a transaction locked. S -> PM.
type LockInformation struct {
Ttid zodb.Tid
Tid zodb.Tid
}
*/
// XXX AnswerInformationLocked ?
type
AnswerLockInformation
struct
{
...
...
@@ -517,12 +520,11 @@ type UnlockInformation struct {
// Ask new object IDs. C -> PM.
// Answer new object IDs. PM -> C.
type
Generate
OIDs
struct
{
type
AskNew
OIDs
struct
{
NumOIDs
uint32
// PNumber
}
// XXX answer_new_oids ?
type
AnswerGenerateOIDs
struct
{
type
AnswerNewOIDs
struct
{
OidList
[]
zodb
.
Oid
}
...
...
@@ -592,16 +594,18 @@ type StoreTransaction struct {
Description
string
Extension
string
OidList
[]
zodb
.
Oid
// TODO _answer = PFEmpty
}
type
AnswerStoreTransaction
struct
{}
// Ask to store a transaction. C -> S.
// Answer if transaction has been stored. S -> C.
type
VoteTransaction
struct
{
Tid
zodb
.
Tid
// TODO _answer = PFEmpty
}
type
AnswerVoteTransaction
struct
{}
// Ask a stored object by its OID and a serial or a TID if given. If a serial
// is specified, the specified revision of an object will be returned. If
// a TID is specified, an object right before the TID will be returned. C -> S.
...
...
go/neo/zproto-marshal.go
View file @
776e85be
...
...
@@ -1241,37 +1241,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 33. LockInformation
func
(
*
LockInformation
)
neoMsgCode
()
uint16
{
return
33
}
func
(
p
*
LockInformation
)
neoMsgEncodedLen
()
int
{
return
16
}
func
(
p
*
LockInformation
)
neoMsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
Ttid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
Tid
))
}
func
(
p
*
LockInformation
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
16
{
goto
overflow
}
p
.
Ttid
=
zodb
.
Tid
(
binary
.
BigEndian
.
Uint64
(
data
[
0
:
]))
p
.
Tid
=
zodb
.
Tid
(
binary
.
BigEndian
.
Uint64
(
data
[
8
:
]))
return
16
,
nil
overflow
:
return
0
,
ErrDecodeOverflow
}
// 34. AnswerLockInformation
// 33. AnswerLockInformation
func
(
*
AnswerLockInformation
)
neoMsgCode
()
uint16
{
return
3
4
|
answerBit
return
3
3
|
answerBit
}
func
(
p
*
AnswerLockInformation
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1293,10 +1266,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 3
5
. InvalidateObjects
// 3
4
. InvalidateObjects
func
(
*
InvalidateObjects
)
neoMsgCode
()
uint16
{
return
3
5
return
3
4
}
func
(
p
*
InvalidateObjects
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1343,10 +1316,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 3
6
. UnlockInformation
// 3
5
. UnlockInformation
func
(
*
UnlockInformation
)
neoMsgCode
()
uint16
{
return
3
6
return
3
5
}
func
(
p
*
UnlockInformation
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1368,21 +1341,21 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 3
7. Generate
OIDs
// 3
6. AskNew
OIDs
func
(
*
Generate
OIDs
)
neoMsgCode
()
uint16
{
return
3
7
func
(
*
AskNew
OIDs
)
neoMsgCode
()
uint16
{
return
3
6
}
func
(
p
*
Generate
OIDs
)
neoMsgEncodedLen
()
int
{
func
(
p
*
AskNew
OIDs
)
neoMsgEncodedLen
()
int
{
return
4
}
func
(
p
*
Generate
OIDs
)
neoMsgEncode
(
data
[]
byte
)
{
func
(
p
*
AskNew
OIDs
)
neoMsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
p
.
NumOIDs
)
}
func
(
p
*
Generate
OIDs
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
AskNew
OIDs
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
}
...
...
@@ -1393,17 +1366,17 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 3
8. AnswerGenerate
OIDs
// 3
7. AnswerNew
OIDs
func
(
*
Answer
Generate
OIDs
)
neoMsgCode
()
uint16
{
return
3
8
|
answerBit
func
(
*
Answer
New
OIDs
)
neoMsgCode
()
uint16
{
return
3
7
|
answerBit
}
func
(
p
*
Answer
Generate
OIDs
)
neoMsgEncodedLen
()
int
{
func
(
p
*
Answer
New
OIDs
)
neoMsgEncodedLen
()
int
{
return
4
+
len
(
p
.
OidList
)
*
8
}
func
(
p
*
Answer
Generate
OIDs
)
neoMsgEncode
(
data
[]
byte
)
{
func
(
p
*
Answer
New
OIDs
)
neoMsgEncode
(
data
[]
byte
)
{
{
l
:=
uint32
(
len
(
p
.
OidList
))
binary
.
BigEndian
.
PutUint32
(
data
[
0
:
],
l
)
...
...
@@ -1416,7 +1389,7 @@ func (p *AnswerGenerateOIDs) neoMsgEncode(data []byte) {
}
}
func
(
p
*
Answer
Generate
OIDs
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Answer
New
OIDs
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
if
uint32
(
len
(
data
))
<
4
{
goto
overflow
...
...
@@ -1441,10 +1414,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 3
9
. Deadlock
// 3
8
. Deadlock
func
(
*
Deadlock
)
neoMsgCode
()
uint16
{
return
3
9
return
3
8
}
func
(
p
*
Deadlock
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1468,10 +1441,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
//
40
. RebaseTransaction
//
39
. RebaseTransaction
func
(
*
RebaseTransaction
)
neoMsgCode
()
uint16
{
return
40
return
39
}
func
(
p
*
RebaseTransaction
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1495,10 +1468,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 4
1
. AnswerRebaseTransaction
// 4
0
. AnswerRebaseTransaction
func
(
*
AnswerRebaseTransaction
)
neoMsgCode
()
uint16
{
return
4
1
|
answerBit
return
4
0
|
answerBit
}
func
(
p
*
AnswerRebaseTransaction
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1543,10 +1516,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 4
2
. RebaseObject
// 4
1
. RebaseObject
func
(
*
RebaseObject
)
neoMsgCode
()
uint16
{
return
4
2
return
4
1
}
func
(
p
*
RebaseObject
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1570,10 +1543,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 4
3
. AnswerRebaseObject
// 4
2
. AnswerRebaseObject
func
(
*
AnswerRebaseObject
)
neoMsgCode
()
uint16
{
return
4
3
|
answerBit
return
4
2
|
answerBit
}
func
(
p
*
AnswerRebaseObject
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1620,10 +1593,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 4
4
. StoreObject
// 4
3
. StoreObject
func
(
*
StoreObject
)
neoMsgCode
()
uint16
{
return
4
4
return
4
3
}
func
(
p
*
StoreObject
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1674,10 +1647,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 4
5
. AnswerStoreObject
// 4
4
. AnswerStoreObject
func
(
*
AnswerStoreObject
)
neoMsgCode
()
uint16
{
return
4
5
|
answerBit
return
4
4
|
answerBit
}
func
(
p
*
AnswerStoreObject
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1699,10 +1672,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 4
6
. AbortTransaction
// 4
5
. AbortTransaction
func
(
*
AbortTransaction
)
neoMsgCode
()
uint16
{
return
4
6
return
4
5
}
func
(
p
*
AbortTransaction
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1749,10 +1722,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 4
7
. StoreTransaction
// 4
6
. StoreTransaction
func
(
*
StoreTransaction
)
neoMsgCode
()
uint16
{
return
4
7
return
4
6
}
func
(
p
*
StoreTransaction
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1850,6 +1823,23 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 47. AnswerStoreTransaction
func
(
*
AnswerStoreTransaction
)
neoMsgCode
()
uint16
{
return
47
|
answerBit
}
func
(
p
*
AnswerStoreTransaction
)
neoMsgEncodedLen
()
int
{
return
0
}
func
(
p
*
AnswerStoreTransaction
)
neoMsgEncode
(
data
[]
byte
)
{
}
func
(
p
*
AnswerStoreTransaction
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
}
// 48. VoteTransaction
func
(
*
VoteTransaction
)
neoMsgCode
()
uint16
{
...
...
@@ -1875,10 +1865,27 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 49. GetObject
// 49. AnswerVoteTransaction
func
(
*
AnswerVoteTransaction
)
neoMsgCode
()
uint16
{
return
49
|
answerBit
}
func
(
p
*
AnswerVoteTransaction
)
neoMsgEncodedLen
()
int
{
return
0
}
func
(
p
*
AnswerVoteTransaction
)
neoMsgEncode
(
data
[]
byte
)
{
}
func
(
p
*
AnswerVoteTransaction
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
,
nil
}
// 50. GetObject
func
(
*
GetObject
)
neoMsgCode
()
uint16
{
return
49
return
50
}
func
(
p
*
GetObject
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1904,10 +1911,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 5
0
. AnswerGetObject
// 5
1
. AnswerGetObject
func
(
*
AnswerGetObject
)
neoMsgCode
()
uint16
{
return
5
0
|
answerBit
return
5
1
|
answerBit
}
func
(
p
*
AnswerGetObject
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1958,10 +1965,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 5
1
. TIDList
// 5
2
. TIDList
func
(
*
TIDList
)
neoMsgCode
()
uint16
{
return
5
1
return
5
2
}
func
(
p
*
TIDList
)
neoMsgEncodedLen
()
int
{
...
...
@@ -1987,10 +1994,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 5
2
. AnswerTIDList
// 5
3
. AnswerTIDList
func
(
*
AnswerTIDList
)
neoMsgCode
()
uint16
{
return
5
2
|
answerBit
return
5
3
|
answerBit
}
func
(
p
*
AnswerTIDList
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2035,10 +2042,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 5
3
. TIDListFrom
// 5
4
. TIDListFrom
func
(
*
TIDListFrom
)
neoMsgCode
()
uint16
{
return
5
3
return
5
4
}
func
(
p
*
TIDListFrom
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2066,10 +2073,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 5
4
. AnswerTIDListFrom
// 5
5
. AnswerTIDListFrom
func
(
*
AnswerTIDListFrom
)
neoMsgCode
()
uint16
{
return
5
4
|
answerBit
return
5
5
|
answerBit
}
func
(
p
*
AnswerTIDListFrom
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2114,10 +2121,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 5
5
. TransactionInformation
// 5
6
. TransactionInformation
func
(
*
TransactionInformation
)
neoMsgCode
()
uint16
{
return
5
5
return
5
6
}
func
(
p
*
TransactionInformation
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2139,10 +2146,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 5
6
. AnswerTransactionInformation
// 5
7
. AnswerTransactionInformation
func
(
*
AnswerTransactionInformation
)
neoMsgCode
()
uint16
{
return
5
6
|
answerBit
return
5
7
|
answerBit
}
func
(
p
*
AnswerTransactionInformation
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2242,10 +2249,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 5
7
. ObjectHistory
// 5
8
. ObjectHistory
func
(
*
ObjectHistory
)
neoMsgCode
()
uint16
{
return
5
7
return
5
8
}
func
(
p
*
ObjectHistory
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2271,10 +2278,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 5
8
. AnswerObjectHistory
// 5
9
. AnswerObjectHistory
func
(
*
AnswerObjectHistory
)
neoMsgCode
()
uint16
{
return
5
8
|
answerBit
return
5
9
|
answerBit
}
func
(
p
*
AnswerObjectHistory
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2326,10 +2333,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
//
59
. PartitionList
//
60
. PartitionList
func
(
*
PartitionList
)
neoMsgCode
()
uint16
{
return
59
return
60
}
func
(
p
*
PartitionList
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2355,10 +2362,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 6
0
. AnswerPartitionList
// 6
1
. AnswerPartitionList
func
(
*
AnswerPartitionList
)
neoMsgCode
()
uint16
{
return
6
0
|
answerBit
return
6
1
|
answerBit
}
func
(
p
*
AnswerPartitionList
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2435,10 +2442,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 6
1
. NodeList
// 6
2
. NodeList
func
(
*
NodeList
)
neoMsgCode
()
uint16
{
return
6
1
return
6
2
}
func
(
p
*
NodeList
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2460,10 +2467,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 6
2
. AnswerNodeList
// 6
3
. AnswerNodeList
func
(
*
AnswerNodeList
)
neoMsgCode
()
uint16
{
return
6
2
|
answerBit
return
6
3
|
answerBit
}
func
(
p
*
AnswerNodeList
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2538,10 +2545,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 6
3
. SetNodeState
// 6
4
. SetNodeState
func
(
*
SetNodeState
)
neoMsgCode
()
uint16
{
return
6
3
return
6
4
}
func
(
p
*
SetNodeState
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2565,10 +2572,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 6
4
. AddPendingNodes
// 6
5
. AddPendingNodes
func
(
*
AddPendingNodes
)
neoMsgCode
()
uint16
{
return
6
4
return
6
5
}
func
(
p
*
AddPendingNodes
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2613,10 +2620,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 6
5
. TweakPartitionTable
// 6
6
. TweakPartitionTable
func
(
*
TweakPartitionTable
)
neoMsgCode
()
uint16
{
return
6
5
return
6
6
}
func
(
p
*
TweakPartitionTable
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2661,10 +2668,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 6
6
. NodeInformation
// 6
7
. NodeInformation
func
(
*
NodeInformation
)
neoMsgCode
()
uint16
{
return
6
6
return
6
7
}
func
(
p
*
NodeInformation
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2678,10 +2685,10 @@ func (p *NodeInformation) neoMsgDecode(data []byte) (int, error) {
return
0
,
nil
}
// 6
7
. SetClusterState
// 6
8
. SetClusterState
func
(
*
SetClusterState
)
neoMsgCode
()
uint16
{
return
6
7
return
6
8
}
func
(
p
*
SetClusterState
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2703,10 +2710,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 6
8
. repairFlags
// 6
9
. repairFlags
func
(
*
repairFlags
)
neoMsgCode
()
uint16
{
return
6
8
return
6
9
}
func
(
p
*
repairFlags
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2728,10 +2735,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
//
69
. Repair
//
70
. Repair
func
(
*
Repair
)
neoMsgCode
()
uint16
{
return
69
return
70
}
func
(
p
*
Repair
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2778,10 +2785,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 7
0
. RepairOne
// 7
1
. RepairOne
func
(
*
RepairOne
)
neoMsgCode
()
uint16
{
return
7
0
return
7
1
}
func
(
p
*
RepairOne
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2803,10 +2810,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 7
1
. NotifyClusterState
// 7
2
. NotifyClusterState
func
(
*
NotifyClusterState
)
neoMsgCode
()
uint16
{
return
7
1
return
7
2
}
func
(
p
*
NotifyClusterState
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2828,10 +2835,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 7
2
. AskClusterState
// 7
3
. AskClusterState
func
(
*
AskClusterState
)
neoMsgCode
()
uint16
{
return
7
2
return
7
3
}
func
(
p
*
AskClusterState
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2845,10 +2852,10 @@ func (p *AskClusterState) neoMsgDecode(data []byte) (int, error) {
return
0
,
nil
}
// 7
3
. AnswerClusterState
// 7
4
. AnswerClusterState
func
(
*
AnswerClusterState
)
neoMsgCode
()
uint16
{
return
7
3
|
answerBit
return
7
4
|
answerBit
}
func
(
p
*
AnswerClusterState
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2870,10 +2877,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 7
4
. ObjectUndoSerial
// 7
5
. ObjectUndoSerial
func
(
*
ObjectUndoSerial
)
neoMsgCode
()
uint16
{
return
7
4
return
7
5
}
func
(
p
*
ObjectUndoSerial
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2924,10 +2931,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 7
5
. AnswerObjectUndoSerial
// 7
6
. AnswerObjectUndoSerial
func
(
*
AnswerObjectUndoSerial
)
neoMsgCode
()
uint16
{
return
7
5
|
answerBit
return
7
6
|
answerBit
}
func
(
p
*
AnswerObjectUndoSerial
)
neoMsgEncodedLen
()
int
{
...
...
@@ -2992,10 +2999,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 7
6
. CheckCurrentSerial
// 7
7
. CheckCurrentSerial
func
(
*
CheckCurrentSerial
)
neoMsgCode
()
uint16
{
return
7
6
return
7
7
}
func
(
p
*
CheckCurrentSerial
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3021,10 +3028,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 7
7
. Pack
// 7
8
. Pack
func
(
*
Pack
)
neoMsgCode
()
uint16
{
return
7
7
return
7
8
}
func
(
p
*
Pack
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3046,10 +3053,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 7
8
. AnswerPack
// 7
9
. AnswerPack
func
(
*
AnswerPack
)
neoMsgCode
()
uint16
{
return
7
8
|
answerBit
return
7
9
|
answerBit
}
func
(
p
*
AnswerPack
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3071,10 +3078,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
//
79
. CheckReplicas
//
80
. CheckReplicas
func
(
*
CheckReplicas
)
neoMsgCode
()
uint16
{
return
79
return
80
}
func
(
p
*
CheckReplicas
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3129,10 +3136,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 8
0
. CheckPartition
// 8
1
. CheckPartition
func
(
*
CheckPartition
)
neoMsgCode
()
uint16
{
return
8
0
return
8
1
}
func
(
p
*
CheckPartition
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3195,10 +3202,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 8
1
. CheckTIDRange
// 8
2
. CheckTIDRange
func
(
*
CheckTIDRange
)
neoMsgCode
()
uint16
{
return
8
1
return
8
2
}
func
(
p
*
CheckTIDRange
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3226,10 +3233,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 8
2
. AnswerCheckTIDRange
// 8
3
. AnswerCheckTIDRange
func
(
*
AnswerCheckTIDRange
)
neoMsgCode
()
uint16
{
return
8
2
|
answerBit
return
8
3
|
answerBit
}
func
(
p
*
AnswerCheckTIDRange
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3255,10 +3262,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 8
3
. CheckSerialRange
// 8
4
. CheckSerialRange
func
(
*
CheckSerialRange
)
neoMsgCode
()
uint16
{
return
8
3
return
8
4
}
func
(
p
*
CheckSerialRange
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3288,10 +3295,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 8
4
. AnswerCheckSerialRange
// 8
5
. AnswerCheckSerialRange
func
(
*
AnswerCheckSerialRange
)
neoMsgCode
()
uint16
{
return
8
4
|
answerBit
return
8
5
|
answerBit
}
func
(
p
*
AnswerCheckSerialRange
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3321,10 +3328,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 8
5
. PartitionCorrupted
// 8
6
. PartitionCorrupted
func
(
*
PartitionCorrupted
)
neoMsgCode
()
uint16
{
return
8
5
return
8
6
}
func
(
p
*
PartitionCorrupted
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3371,10 +3378,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 8
6
. LastTransaction
// 8
7
. LastTransaction
func
(
*
LastTransaction
)
neoMsgCode
()
uint16
{
return
8
6
return
8
7
}
func
(
p
*
LastTransaction
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3388,10 +3395,10 @@ func (p *LastTransaction) neoMsgDecode(data []byte) (int, error) {
return
0
,
nil
}
// 8
7
. AnswerLastTransaction
// 8
8
. AnswerLastTransaction
func
(
*
AnswerLastTransaction
)
neoMsgCode
()
uint16
{
return
8
7
|
answerBit
return
8
8
|
answerBit
}
func
(
p
*
AnswerLastTransaction
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3413,10 +3420,10 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 8
8
. NotifyReady
// 8
9
. NotifyReady
func
(
*
NotifyReady
)
neoMsgCode
()
uint16
{
return
8
8
return
8
9
}
func
(
p
*
NotifyReady
)
neoMsgEncodedLen
()
int
{
...
...
@@ -3465,60 +3472,61 @@ var msgTypeRegistry = map[uint16]reflect.Type{
30
:
reflect
.
TypeOf
(
FinishTransaction
{}),
31
|
answerBit
:
reflect
.
TypeOf
(
AnswerFinishTransaction
{}),
32
:
reflect
.
TypeOf
(
NotifyTransactionFinished
{}),
33
:
reflect
.
TypeOf
(
LockInformation
{}),
34
|
answerBit
:
reflect
.
TypeOf
(
AnswerLockInformation
{}),
35
:
reflect
.
TypeOf
(
InvalidateObjects
{}),
36
:
reflect
.
TypeOf
(
UnlockInformation
{}),
37
:
reflect
.
TypeOf
(
Generate
OIDs
{}),
38
|
answerBit
:
reflect
.
TypeOf
(
AnswerGenerateOIDs
{}),
39
:
reflect
.
TypeOf
(
Deadlock
{}),
40
:
reflect
.
TypeOf
(
RebaseTransaction
{}),
41
|
answerBit
:
reflect
.
TypeOf
(
AnswerRebaseTransaction
{}),
42
:
reflect
.
TypeOf
(
RebaseObject
{}),
43
|
answerBit
:
reflect
.
TypeOf
(
AnswerRebas
eObject
{}),
44
:
reflect
.
TypeOf
(
StoreObject
{}),
45
|
answerBit
:
reflect
.
TypeOf
(
AnswerStoreObject
{}),
46
:
reflect
.
TypeOf
(
Abort
Transaction
{}),
47
:
reflect
.
TypeOf
(
StoreTransaction
{}),
33
|
answerBit
:
reflect
.
TypeOf
(
Answer
LockInformation
{}),
34
:
reflect
.
TypeOf
(
InvalidateObjects
{}),
35
:
reflect
.
TypeOf
(
UnlockInformation
{}),
36
:
reflect
.
TypeOf
(
AskNewOIDs
{}),
37
|
answerBit
:
reflect
.
TypeOf
(
AnswerNew
OIDs
{}),
38
:
reflect
.
TypeOf
(
Deadlock
{}),
39
:
reflect
.
TypeOf
(
RebaseTransaction
{}),
40
|
answerBit
:
reflect
.
TypeOf
(
Answer
RebaseTransaction
{}),
41
:
reflect
.
TypeOf
(
RebaseObject
{}),
42
|
answerBit
:
reflect
.
TypeOf
(
Answer
RebaseObject
{}),
43
:
reflect
.
TypeOf
(
Stor
eObject
{}),
44
|
answerBit
:
reflect
.
TypeOf
(
Answer
StoreObject
{}),
45
:
reflect
.
TypeOf
(
AbortTransaction
{}),
46
:
reflect
.
TypeOf
(
Store
Transaction
{}),
47
|
answerBit
:
reflect
.
TypeOf
(
Answer
StoreTransaction
{}),
48
:
reflect
.
TypeOf
(
VoteTransaction
{}),
49
:
reflect
.
TypeOf
(
GetObject
{}),
50
|
answerBit
:
reflect
.
TypeOf
(
AnswerGetObject
{}),
51
:
reflect
.
TypeOf
(
TIDList
{}),
52
|
answerBit
:
reflect
.
TypeOf
(
AnswerTIDList
{}),
53
:
reflect
.
TypeOf
(
TIDListFrom
{}),
54
|
answerBit
:
reflect
.
TypeOf
(
AnswerTIDListFrom
{}),
55
:
reflect
.
TypeOf
(
TransactionInformation
{}),
56
|
answerBit
:
reflect
.
TypeOf
(
AnswerTransactionInformation
{}),
57
:
reflect
.
TypeOf
(
ObjectHistory
{}),
58
|
answerBit
:
reflect
.
TypeOf
(
AnswerObjectHistory
{}),
59
:
reflect
.
TypeOf
(
PartitionList
{}),
60
|
answerBit
:
reflect
.
TypeOf
(
AnswerPartitionList
{}),
61
:
reflect
.
TypeOf
(
NodeList
{}),
62
|
answerBit
:
reflect
.
TypeOf
(
AnswerNodeList
{}),
63
:
reflect
.
TypeOf
(
SetNodeState
{}),
64
:
reflect
.
TypeOf
(
AddPendingNodes
{}),
65
:
reflect
.
TypeOf
(
TweakPartitionTable
{}),
66
:
reflect
.
TypeOf
(
NodeInformation
{}),
67
:
reflect
.
TypeOf
(
SetClusterState
{}),
68
:
reflect
.
TypeOf
(
repairFlags
{}),
69
:
reflect
.
TypeOf
(
Repair
{}),
70
:
reflect
.
TypeOf
(
RepairOne
{}),
71
:
reflect
.
TypeOf
(
NotifyClusterState
{}),
72
:
reflect
.
TypeOf
(
AskClusterState
{}),
73
|
answerBit
:
reflect
.
TypeOf
(
AnswerClusterState
{}),
74
:
reflect
.
TypeOf
(
ObjectUndoSerial
{}),
75
|
answerBit
:
reflect
.
TypeOf
(
AnswerObjectUndoSerial
{}),
76
:
reflect
.
TypeOf
(
CheckCurrentSerial
{}),
77
:
reflect
.
TypeOf
(
Pack
{}),
78
|
answerBit
:
reflect
.
TypeOf
(
AnswerPack
{}),
79
:
reflect
.
TypeOf
(
CheckReplicas
{}),
80
:
reflect
.
TypeOf
(
CheckPartition
{}),
81
:
reflect
.
TypeOf
(
CheckTIDRange
{}),
82
|
answerBit
:
reflect
.
TypeOf
(
AnswerCheckTIDRange
{}),
83
:
reflect
.
TypeOf
(
CheckSerialRange
{}),
84
|
answerBit
:
reflect
.
TypeOf
(
AnswerCheckSerialRange
{}),
85
:
reflect
.
TypeOf
(
PartitionCorrupted
{}),
86
:
reflect
.
TypeOf
(
LastTransaction
{}),
87
|
answerBit
:
reflect
.
TypeOf
(
AnswerLastTransaction
{}),
88
:
reflect
.
TypeOf
(
NotifyReady
{}),
49
|
answerBit
:
reflect
.
TypeOf
(
AnswerVoteTransaction
{}),
50
:
reflect
.
TypeOf
(
GetObject
{}),
51
|
answerBit
:
reflect
.
TypeOf
(
AnswerGetObject
{}),
52
:
reflect
.
TypeOf
(
TIDList
{}),
53
|
answerBit
:
reflect
.
TypeOf
(
AnswerTIDList
{}),
54
:
reflect
.
TypeOf
(
TIDListFrom
{}),
55
|
answerBit
:
reflect
.
TypeOf
(
AnswerTIDListFrom
{}),
56
:
reflect
.
TypeOf
(
TransactionInformation
{}),
57
|
answerBit
:
reflect
.
TypeOf
(
AnswerTransactionInformation
{}),
58
:
reflect
.
TypeOf
(
ObjectHistory
{}),
59
|
answerBit
:
reflect
.
TypeOf
(
AnswerObjectHistory
{}),
60
:
reflect
.
TypeOf
(
PartitionList
{}),
61
|
answerBit
:
reflect
.
TypeOf
(
AnswerPartitionList
{}),
62
:
reflect
.
TypeOf
(
NodeList
{}),
63
|
answerBit
:
reflect
.
TypeOf
(
AnswerNodeList
{}),
64
:
reflect
.
TypeOf
(
SetNodeState
{}),
65
:
reflect
.
TypeOf
(
AddPendingNodes
{}),
66
:
reflect
.
TypeOf
(
TweakPartitionTable
{}),
67
:
reflect
.
TypeOf
(
NodeInformation
{}),
68
:
reflect
.
TypeOf
(
SetClusterState
{}),
69
:
reflect
.
TypeOf
(
repairFlags
{}),
70
:
reflect
.
TypeOf
(
Repair
{}),
71
:
reflect
.
TypeOf
(
RepairOne
{}),
72
:
reflect
.
TypeOf
(
NotifyClusterState
{}),
73
:
reflect
.
TypeOf
(
AskClusterState
{}),
74
|
answerBit
:
reflect
.
TypeOf
(
AnswerClusterState
{}),
75
:
reflect
.
TypeOf
(
ObjectUndoSerial
{}),
76
|
answerBit
:
reflect
.
TypeOf
(
AnswerObjectUndoSerial
{}),
77
:
reflect
.
TypeOf
(
CheckCurrentSerial
{}),
78
:
reflect
.
TypeOf
(
Pack
{}),
79
|
answerBit
:
reflect
.
TypeOf
(
AnswerPack
{}),
80
:
reflect
.
TypeOf
(
CheckReplicas
{}),
81
:
reflect
.
TypeOf
(
CheckPartition
{}),
82
:
reflect
.
TypeOf
(
CheckTIDRange
{}),
83
|
answerBit
:
reflect
.
TypeOf
(
AnswerCheckTIDRange
{}),
84
:
reflect
.
TypeOf
(
CheckSerialRange
{}),
85
|
answerBit
:
reflect
.
TypeOf
(
AnswerCheckSerialRange
{}),
86
:
reflect
.
TypeOf
(
PartitionCorrupted
{}),
87
:
reflect
.
TypeOf
(
LastTransaction
{}),
88
|
answerBit
:
reflect
.
TypeOf
(
AnswerLastTransaction
{}),
89
:
reflect
.
TypeOf
(
NotifyReady
{}),
}
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