Commit 7e4e3213 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 27a72fd2
......@@ -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()
......
......@@ -8,16 +8,16 @@ var pyMsgRegistry = map[uint16]string{
6: "AskPrimary",
8: "NotPrimaryMaster",
9: "NotifyNodeInformation",
10: "AskRecovery",
12: "AskLastIDs",
10: "Recovery",
12: "LastIDs",
14: "AskPartitionTable",
16: "SendPartitionTable",
17: "NotifyPartitionChanges",
18: "StartOperation",
19: "StopOperation",
20: "AskUnfinishedTransactions",
22: "AskLockedTransactions",
24: "AskFinalTID",
20: "UnfinishedTransactions",
22: "LockedTransactions",
24: "FinalTID",
26: "ValidateTransaction",
27: "AskBeginTransaction",
29: "FailedVote",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment