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:
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…
Reference in New Issue
Block a user