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
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
Stefane Fermigier
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 {
...
@@ -382,8 +382,7 @@ type AnswerPartitionTable struct {
}
}
// Send whole partition table to update other nodes. PM -> S, C.
// Send whole partition table to update other nodes. PM -> S, C.
// XXX py: named also as SendPartitionTable
type
SendPartitionTable
struct
{
type
NotifyPartitionTable
struct
{
PTid
PTid
RowList
[]
RowInfo
RowList
[]
RowInfo
}
}
...
...
go/neo/zproto-marshal.go
View file @
27a72fd2
...
@@ -588,13 +588,13 @@ overflow:
...
@@ -588,13 +588,13 @@ overflow:
return
0
,
ErrDecodeOverflow
return
0
,
ErrDecodeOverflow
}
}
// 16.
Notify
PartitionTable
// 16.
Send
PartitionTable
func
(
*
Notify
PartitionTable
)
neoMsgCode
()
uint16
{
func
(
*
Send
PartitionTable
)
neoMsgCode
()
uint16
{
return
16
return
16
}
}
func
(
p
*
Notify
PartitionTable
)
neoMsgEncodedLen
()
int
{
func
(
p
*
Send
PartitionTable
)
neoMsgEncodedLen
()
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
]
...
@@ -603,7 +603,7 @@ func (p *NotifyPartitionTable) neoMsgEncodedLen() int {
...
@@ -603,7 +603,7 @@ func (p *NotifyPartitionTable) neoMsgEncodedLen() int {
return
12
+
len
(
p
.
RowList
)
*
8
+
size
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
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
PTid
))
{
{
l
:=
uint32
(
len
(
p
.
RowList
))
l
:=
uint32
(
len
(
p
.
RowList
))
...
@@ -628,7 +628,7 @@ func (p *NotifyPartitionTable) neoMsgEncode(data []byte) {
...
@@ -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
var
nread
uint32
if
uint32
(
len
(
data
))
<
12
{
if
uint32
(
len
(
data
))
<
12
{
goto
overflow
goto
overflow
...
@@ -3455,7 +3455,7 @@ var msgTypeRegistry = map[uint16]reflect.Type{
...
@@ -3455,7 +3455,7 @@ var msgTypeRegistry = map[uint16]reflect.Type{
13
|
answerBit
:
reflect
.
TypeOf
(
AnswerLastIDs
{}),
13
|
answerBit
:
reflect
.
TypeOf
(
AnswerLastIDs
{}),
14
:
reflect
.
TypeOf
(
AskPartitionTable
{}),
14
:
reflect
.
TypeOf
(
AskPartitionTable
{}),
15
|
answerBit
:
reflect
.
TypeOf
(
AnswerPartitionTable
{}),
15
|
answerBit
:
reflect
.
TypeOf
(
AnswerPartitionTable
{}),
16
:
reflect
.
TypeOf
(
Notify
PartitionTable
{}),
16
:
reflect
.
TypeOf
(
Send
PartitionTable
{}),
17
:
reflect
.
TypeOf
(
NotifyPartitionChanges
{}),
17
:
reflect
.
TypeOf
(
NotifyPartitionChanges
{}),
18
:
reflect
.
TypeOf
(
StartOperation
{}),
18
:
reflect
.
TypeOf
(
StartOperation
{}),
19
:
reflect
.
TypeOf
(
StopOperation
{}),
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