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
27a72fd2
Commit
27a72fd2
authored
Sep 03, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
776e85be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
go/neo/proto.go
go/neo/proto.go
+1
-2
go/neo/zproto-marshal.go
go/neo/zproto-marshal.go
+6
-6
No files found.
go/neo/proto.go
View file @
27a72fd2
...
...
@@ -382,8 +382,7 @@ type AnswerPartitionTable struct {
}
// Send whole partition table to update other nodes. PM -> S, C.
// XXX py: named also as SendPartitionTable
type
NotifyPartitionTable
struct
{
type
SendPartitionTable
struct
{
PTid
RowList
[]
RowInfo
}
...
...
go/neo/zproto-marshal.go
View file @
27a72fd2
...
...
@@ -588,13 +588,13 @@ overflow:
return
0
,
ErrDecodeOverflow
}
// 16.
Notify
PartitionTable
// 16.
Send
PartitionTable
func
(
*
Notify
PartitionTable
)
neoMsgCode
()
uint16
{
func
(
*
Send
PartitionTable
)
neoMsgCode
()
uint16
{
return
16
}
func
(
p
*
Notify
PartitionTable
)
neoMsgEncodedLen
()
int
{
func
(
p
*
Send
PartitionTable
)
neoMsgEncodedLen
()
int
{
var
size
int
for
i
:=
0
;
i
<
len
(
p
.
RowList
);
i
++
{
a
:=
&
p
.
RowList
[
i
]
...
...
@@ -603,7 +603,7 @@ func (p *NotifyPartitionTable) neoMsgEncodedLen() int {
return
12
+
len
(
p
.
RowList
)
*
8
+
size
}
func
(
p
*
Notify
PartitionTable
)
neoMsgEncode
(
data
[]
byte
)
{
func
(
p
*
Send
PartitionTable
)
neoMsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
{
l
:=
uint32
(
len
(
p
.
RowList
))
...
...
@@ -628,7 +628,7 @@ func (p *NotifyPartitionTable) neoMsgEncode(data []byte) {
}
}
func
(
p
*
Notify
PartitionTable
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Send
PartitionTable
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
...
...
@@ -3455,7 +3455,7 @@ var msgTypeRegistry = map[uint16]reflect.Type{
13
|
answerBit
:
reflect
.
TypeOf
(
AnswerLastIDs
{}),
14
:
reflect
.
TypeOf
(
AskPartitionTable
{}),
15
|
answerBit
:
reflect
.
TypeOf
(
AnswerPartitionTable
{}),
16
:
reflect
.
TypeOf
(
Notify
PartitionTable
{}),
16
:
reflect
.
TypeOf
(
Send
PartitionTable
{}),
17
:
reflect
.
TypeOf
(
NotifyPartitionChanges
{}),
18
:
reflect
.
TypeOf
(
StartOperation
{}),
19
:
reflect
.
TypeOf
(
StopOperation
{}),
...
...
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