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
707b67b4
Commit
707b67b4
authored
Dec 27, 2016
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
41b801c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletion
+40
-1
t/neo/marshal.go
t/neo/marshal.go
+39
-0
t/neo/proto.go
t/neo/proto.go
+1
-1
No files found.
t/neo/marshal.go
View file @
707b67b4
...
...
@@ -538,3 +538,42 @@ func (p *GetObject) NEODecode(data []byte) (int, error) {
p
.
Tid
=
BigEndian
.
Uint64
(
data
[
16
:
])
return
24
/* + TODO variable part */
,
nil
}
func
(
p
*
AnswerGetObject
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
Oid
=
BigEndian
.
Uint64
(
data
[
0
:
])
p
.
SerialStart
=
BigEndian
.
Uint64
(
data
[
8
:
])
p
.
SerialEnd
=
BigEndian
.
Uint64
(
data
[
16
:
])
p
.
Compression
=
bool
((
data
[
24
:
])[
0
])
p
.
Checksum
[
0
]
=
(
data
[
25
:
])[
0
]
p
.
Checksum
[
1
]
=
(
data
[
26
:
])[
0
]
p
.
Checksum
[
2
]
=
(
data
[
27
:
])[
0
]
p
.
Checksum
[
3
]
=
(
data
[
28
:
])[
0
]
p
.
Checksum
[
4
]
=
(
data
[
29
:
])[
0
]
p
.
Checksum
[
5
]
=
(
data
[
30
:
])[
0
]
p
.
Checksum
[
6
]
=
(
data
[
31
:
])[
0
]
p
.
Checksum
[
7
]
=
(
data
[
32
:
])[
0
]
p
.
Checksum
[
8
]
=
(
data
[
33
:
])[
0
]
p
.
Checksum
[
9
]
=
(
data
[
34
:
])[
0
]
p
.
Checksum
[
10
]
=
(
data
[
35
:
])[
0
]
p
.
Checksum
[
11
]
=
(
data
[
36
:
])[
0
]
p
.
Checksum
[
12
]
=
(
data
[
37
:
])[
0
]
p
.
Checksum
[
13
]
=
(
data
[
38
:
])[
0
]
p
.
Checksum
[
14
]
=
(
data
[
39
:
])[
0
]
p
.
Checksum
[
15
]
=
(
data
[
40
:
])[
0
]
p
.
Checksum
[
16
]
=
(
data
[
41
:
])[
0
]
p
.
Checksum
[
17
]
=
(
data
[
42
:
])[
0
]
p
.
Checksum
[
18
]
=
(
data
[
43
:
])[
0
]
p
.
Checksum
[
19
]
=
(
data
[
44
:
])[
0
]
{
l
:=
BigEndian
.
Uint32
(
data
[
45
:
])
data
=
data
[
49
:
]
p
.
Data
=
make
([]
byte
,
l
)
for
i
:=
0
;
i
<
l
;
i
++
{
a
:=
&
p
.
Data
[
i
]
a
=
(
data
[
0
:
])[
0
]
data
=
data
[
1
:
]
}
}
p
.
DataSerial
=
BigEndian
.
Uint64
(
data
[
0
:
])
return
8
/* + TODO variable part */
,
nil
}
t/neo/proto.go
View file @
707b67b4
...
...
@@ -470,7 +470,6 @@ type GetObject struct {
Tid
Tid
}
/*
// XXX answer_object ?
type
AnswerGetObject
struct
{
Oid
Oid
...
...
@@ -482,6 +481,7 @@ type AnswerGetObject struct {
DataSerial
Tid
}
/*
// Ask for TIDs between a range of offsets. The order of TIDs is descending,
// and the range is [first, last). C -> S.
// Answer the requested TIDs. S -> C.
...
...
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