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
97ddfc96
Commit
97ddfc96
authored
Dec 27, 2016
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X: AnswerPartitionTable - wrong code for slice of slice
parent
d2e49b19
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
t/neo/marshal.go
t/neo/marshal.go
+23
-0
t/neo/proto.go
t/neo/proto.go
+1
-1
No files found.
t/neo/marshal.go
View file @
97ddfc96
...
...
@@ -179,3 +179,26 @@ func (p *AnswerLastIDs) NEODecode(data []byte) (int, error) {
func
(
p
*
PartitionTable
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
AnswerPartitionTable
)
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
++
{
p
.
RowList
[
i
]
.
Offset
=
BigEndian
.
Uint32
(
data
[
0
:
])
{
l
:=
BigEndian
.
Uint32
(
data
[
4
:
])
data
=
data
[
8
:
]
p
.
RowList
[
i
]
.
CellList
=
make
([]
neo
.
CellInfo
,
l
)
for
i
:=
0
;
i
<
l
;
i
++
{
p
.
RowList
[
i
]
.
CellList
[
i
]
.
UUID
=
int32
(
BigEndian
.
Uint32
(
data
[
0
:
]))
p
.
RowList
[
i
]
.
CellList
[
i
]
.
CellState
=
int32
(
BigEndian
.
Uint32
(
data
[
4
:
]))
data
=
data
[
8
:
]
}
}
data
=
data
[
0
:
]
}
}
return
0
/* + TODO variable part */
,
nil
}
t/neo/proto.go
View file @
97ddfc96
...
...
@@ -274,13 +274,13 @@ type AnswerLastIDs struct {
type
PartitionTable
struct
{
}
/*
type
AnswerPartitionTable
struct
{
PTid
RowList
[]
RowInfo
}
/*
// Send rows in a partition table to update other nodes. PM -> S, C.
type NotifyPartitionTable struct {
PTid
...
...
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