1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 23:08:14 +00:00

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

This commit is contained in:
Martin Milata 2020-10-07 00:59:35 +02:00 committed by Tomas Susanka
parent 3b138b4f98
commit 0376670404
3 changed files with 7 additions and 0 deletions

View File

@ -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)

View File

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

View File

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