Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
Levin Zimmermann
neoppod
Commits
56e14190
Commit
56e14190
authored
Dec 27, 2016
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3c9e9cf0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
1 deletion
+63
-1
t/neo/marshal.go
t/neo/marshal.go
+62
-0
t/neo/proto.go
t/neo/proto.go
+1
-1
No files found.
t/neo/marshal.go
View file @
56e14190
...
@@ -370,3 +370,65 @@ func (p *FinishTransaction) NEODecode(data []byte) (int, error) {
...
@@ -370,3 +370,65 @@ func (p *FinishTransaction) NEODecode(data []byte) (int, error) {
}
}
return
0
/* + TODO variable part */
,
nil
return
0
/* + TODO variable part */
,
nil
}
}
func
(
p
*
AnswerFinishTransaction
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
TTID
=
BigEndian
.
Uint64
(
data
[
0
:
])
p
.
Tid
=
BigEndian
.
Uint64
(
data
[
8
:
])
return
16
/* + TODO variable part */
,
nil
}
func
(
p
*
NotifyTransactionFinished
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
TTID
=
BigEndian
.
Uint64
(
data
[
0
:
])
p
.
MaxTID
=
BigEndian
.
Uint64
(
data
[
8
:
])
return
16
/* + TODO variable part */
,
nil
}
func
(
p
*
LockInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
Ttid
=
BigEndian
.
Uint64
(
data
[
0
:
])
p
.
Tid
=
BigEndian
.
Uint64
(
data
[
8
:
])
return
16
/* + TODO variable part */
,
nil
}
func
(
p
*
AnswerLockInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
Ttid
=
BigEndian
.
Uint64
(
data
[
0
:
])
return
8
/* + TODO variable part */
,
nil
}
func
(
p
*
InvalidateObjects
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
Tid
=
BigEndian
.
Uint64
(
data
[
0
:
])
{
l
:=
BigEndian
.
Uint32
(
data
[
8
:
])
data
=
data
[
12
:
]
p
.
OidList
=
make
([]
neo
.
Oid
,
l
)
for
i
:=
0
;
i
<
l
;
i
++
{
a
:=
&
p
.
OidList
[
i
]
a
=
BigEndian
.
Uint64
(
data
[
0
:
])
data
=
data
[
8
:
]
}
}
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
UnlockInformation
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
TTID
=
BigEndian
.
Uint64
(
data
[
0
:
])
return
8
/* + TODO variable part */
,
nil
}
func
(
p
*
GenerateOIDs
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
NumOIDs
=
BigEndian
.
Uint32
(
data
[
0
:
])
return
4
/* + TODO variable part */
,
nil
}
func
(
p
*
AnswerGenerateOIDs
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
{
l
:=
BigEndian
.
Uint32
(
data
[
0
:
])
data
=
data
[
4
:
]
p
.
OidList
=
make
([]
neo
.
Oid
,
l
)
for
i
:=
0
;
i
<
l
;
i
++
{
a
:=
&
p
.
OidList
[
i
]
a
=
BigEndian
.
Uint64
(
data
[
0
:
])
data
=
data
[
8
:
]
}
}
return
0
/* + TODO variable part */
,
nil
}
t/neo/proto.go
View file @
56e14190
...
@@ -366,7 +366,6 @@ type FinishTransaction struct {
...
@@ -366,7 +366,6 @@ type FinishTransaction struct {
CheckedList
[]
Oid
CheckedList
[]
Oid
}
}
/*
type
AnswerFinishTransaction
struct
{
type
AnswerFinishTransaction
struct
{
TTID
Tid
TTID
Tid
Tid
Tid
Tid
Tid
...
@@ -415,6 +414,7 @@ type AnswerGenerateOIDs struct {
...
@@ -415,6 +414,7 @@ type AnswerGenerateOIDs struct {
}
}
/*
// Ask to store an object. Send an OID, an original serial, a current
// Ask to store an object. Send an OID, an original serial, a current
// transaction ID, and data. C -> S.
// transaction ID, and data. C -> S.
// Answer if an object has been stored. If an object is in conflict,
// Answer if an object has been stored. If an object is in conflict,
...
...
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