feat(common): expose 'unstable' option in generated code

pull/1280/head
Martin Milata 4 years ago committed by Tomas Susanka
parent 3b138b4f98
commit 0376670404

@ -327,6 +327,8 @@ class Descriptor:
if msg_id is None:
msg_id = self.message_types.get(message.name)
unstable = self._get_extension(message, "unstable")
# "from .. import protobuf as p"
yield self.protobuf_import + " as p"
@ -358,6 +360,9 @@ class Descriptor:
if msg_id is not None:
yield " MESSAGE_WIRE_TYPE = {}".format(msg_id)
if unstable is not None:
yield " UNSTABLE = True"
if fields:
yield ""
yield from self.create_init_method(fields)

@ -13,6 +13,7 @@ if __debug__:
class AuthorizeCoinJoin(p.MessageType):
MESSAGE_WIRE_TYPE = 51
UNSTABLE = True
def __init__(
self,

@ -13,6 +13,7 @@ if __debug__:
class AuthorizeCoinJoin(p.MessageType):
MESSAGE_WIRE_TYPE = 51
UNSTABLE = True
def __init__(
self,

Loading…
Cancel
Save