mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
bolt-gen: use ordered-dict for fields
Use ordered dict for fields, who's order matters when iterated through (especially for argument lists). Reported-By: @mocacinno
This commit is contained in:
parent
918e130448
commit
1044e37fee
@ -18,6 +18,7 @@
|
||||
# subtypedata,<subtypename>,<fieldname>,<typename>,[<count>]
|
||||
|
||||
from argparse import ArgumentParser, REMAINDER
|
||||
from collections import OrderedDict
|
||||
import copy
|
||||
import fileinput
|
||||
from mako.template import Template
|
||||
@ -98,7 +99,7 @@ class Field(object):
|
||||
|
||||
class FieldSet(object):
|
||||
def __init__(self):
|
||||
self.fields = {}
|
||||
self.fields = OrderedDict()
|
||||
self.optional_fields = False
|
||||
self.len_fields = {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user