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
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 @@
# See https://www.nexedi.com/licensing for rationale and options.
"""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
():
pyprotog
=
{}
execfile
(
'../../neo/lib/protocol.py'
,
pyprotog
)
...
...
@@ -51,7 +65,9 @@ def main():
pypktv
.
sort
(
key
=
lambda
pkt
:
pkt
.
_code
)
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.sort()
...
...
go/neo/ztestdata_proto_py_test.go
View file @
7e4e3213
...
...
@@ -8,16 +8,16 @@ var pyMsgRegistry = map[uint16]string{
6
:
"AskPrimary"
,
8
:
"NotPrimaryMaster"
,
9
:
"NotifyNodeInformation"
,
10
:
"
Ask
Recovery"
,
12
:
"
Ask
LastIDs"
,
10
:
"Recovery"
,
12
:
"LastIDs"
,
14
:
"AskPartitionTable"
,
16
:
"SendPartitionTable"
,
17
:
"NotifyPartitionChanges"
,
18
:
"StartOperation"
,
19
:
"StopOperation"
,
20
:
"
Ask
UnfinishedTransactions"
,
22
:
"
Ask
LockedTransactions"
,
24
:
"
Ask
FinalTID"
,
20
:
"UnfinishedTransactions"
,
22
:
"LockedTransactions"
,
24
:
"FinalTID"
,
26
:
"ValidateTransaction"
,
27
:
"AskBeginTransaction"
,
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