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
bdfc7f26
Commit
bdfc7f26
authored
Dec 27, 2016
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b057ca72
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
t/neo/marshal.go
t/neo/marshal.go
+26
-0
t/neo/proto.go
t/neo/proto.go
+1
-1
No files found.
t/neo/marshal.go
View file @
bdfc7f26
...
...
@@ -225,3 +225,29 @@ func (p *AnswerPartitionTable) NEODecode(data []byte) (int, error) {
}
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
NotifyPartitionTable
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
PTid
=
BigEndian
.
Uint64
(
data
[
0
:
])
{
l
:=
BigEndian
.
Uint32
(
data
[
8
:
])
data
=
data
[
12
:
]
p
.
RowList
=
make
([]
neo
.
RowInfo
,
l
)
for
i
:=
0
;
i
<
l
;
i
++
{
a
:=
&
p
.
RowList
[
i
]
a
.
Offset
=
BigEndian
.
Uint32
(
data
[
0
:
])
{
l
:=
BigEndian
.
Uint32
(
data
[
4
:
])
data
=
data
[
8
:
]
a
.
CellList
=
make
([]
neo
.
CellInfo
,
l
)
for
i
:=
0
;
i
<
l
;
i
++
{
a
:=
&
a
.
CellList
[
i
]
a
.
UUID
=
int32
(
BigEndian
.
Uint32
(
data
[
0
:
]))
a
.
CellState
=
int32
(
BigEndian
.
Uint32
(
data
[
4
:
]))
data
=
data
[
8
:
]
}
}
data
=
data
[
0
:
]
}
}
return
0
/* + TODO variable part */
,
nil
}
t/neo/proto.go
View file @
bdfc7f26
...
...
@@ -280,13 +280,13 @@ type AnswerPartitionTable struct {
}
/*
// Send rows in a partition table to update other nodes. PM -> S, C.
type
NotifyPartitionTable
struct
{
PTid
RowList
[]
RowInfo
}
/*
// Notify a subset of a partition table. This is used to notify changes.
// PM -> S, C.
type PartitionChanges struct {
...
...
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