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
7e4e3213
Commit
7e4e3213
authored
Sep 03, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
27a72fd2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
go/neo/py/pyneo-gen-testdata
go/neo/py/pyneo-gen-testdata
+17
-1
go/neo/ztestdata_proto_py_test.go
go/neo/ztestdata_proto_py_test.go
+5
-5
No files found.
go/neo/py/pyneo-gen-testdata
View file @
7e4e3213
...
@@ -20,6 +20,20 @@
...
@@ -20,6 +20,20 @@
# See https://www.nexedi.com/licensing for rationale and options.
# See https://www.nexedi.com/licensing for rationale and options.
"""generate registry of neo/py packet codes for tests"""
"""generate registry of neo/py packet codes for tests"""
# things that are renamed a bit
# pyname -> goname
renames
=
{}
def
noask
(
name
):
renames
[
'Ask'
+
name
]
=
name
noask
(
'Recovery'
)
noask
(
'LastIDs'
)
noask
(
'UnfinishedTransactions'
)
noask
(
'LockedTransactions'
)
noask
(
'FinalTID'
)
def
main
():
def
main
():
pyprotog
=
{}
pyprotog
=
{}
execfile
(
'../../neo/lib/protocol.py'
,
pyprotog
)
execfile
(
'../../neo/lib/protocol.py'
,
pyprotog
)
...
@@ -51,7 +65,9 @@ def main():
...
@@ -51,7 +65,9 @@ def main():
pypktv
.
sort
(
key
=
lambda
pkt
:
pkt
.
_code
)
pypktv
.
sort
(
key
=
lambda
pkt
:
pkt
.
_code
)
for
pypkt
in
pypktv
:
for
pypkt
in
pypktv
:
emit
(
'
\
t
%d:
\
t
"%s",'
%
(
pypkt
.
_code
,
pypkt
.
_x_use_name
))
name
=
pypkt
.
_x_use_name
name
=
renames
.
get
(
name
,
name
)
emit
(
'
\
t
%d:
\
t
"%s",'
%
(
pypkt
.
_code
,
name
))
#pycodev = pypackets.keys()
#pycodev = pypackets.keys()
#pycodev.sort()
#pycodev.sort()
...
...
go/neo/ztestdata_proto_py_test.go
View file @
7e4e3213
...
@@ -8,16 +8,16 @@ var pyMsgRegistry = map[uint16]string{
...
@@ -8,16 +8,16 @@ var pyMsgRegistry = map[uint16]string{
6
:
"AskPrimary"
,
6
:
"AskPrimary"
,
8
:
"NotPrimaryMaster"
,
8
:
"NotPrimaryMaster"
,
9
:
"NotifyNodeInformation"
,
9
:
"NotifyNodeInformation"
,
10
:
"
Ask
Recovery"
,
10
:
"Recovery"
,
12
:
"
Ask
LastIDs"
,
12
:
"LastIDs"
,
14
:
"AskPartitionTable"
,
14
:
"AskPartitionTable"
,
16
:
"SendPartitionTable"
,
16
:
"SendPartitionTable"
,
17
:
"NotifyPartitionChanges"
,
17
:
"NotifyPartitionChanges"
,
18
:
"StartOperation"
,
18
:
"StartOperation"
,
19
:
"StopOperation"
,
19
:
"StopOperation"
,
20
:
"
Ask
UnfinishedTransactions"
,
20
:
"UnfinishedTransactions"
,
22
:
"
Ask
LockedTransactions"
,
22
:
"LockedTransactions"
,
24
:
"
Ask
FinalTID"
,
24
:
"FinalTID"
,
26
:
"ValidateTransaction"
,
26
:
"ValidateTransaction"
,
27
:
"AskBeginTransaction"
,
27
:
"AskBeginTransaction"
,
29
:
"FailedVote"
,
29
:
"FailedVote"
,
...
...
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