mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +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:
|
if msg_id is None:
|
||||||
msg_id = self.message_types.get(message.name)
|
msg_id = self.message_types.get(message.name)
|
||||||
|
|
||||||
|
unstable = self._get_extension(message, "unstable")
|
||||||
|
|
||||||
# "from .. import protobuf as p"
|
# "from .. import protobuf as p"
|
||||||
yield self.protobuf_import + " as p"
|
yield self.protobuf_import + " as p"
|
||||||
|
|
||||||
@ -358,6 +360,9 @@ class Descriptor:
|
|||||||
if msg_id is not None:
|
if msg_id is not None:
|
||||||
yield " MESSAGE_WIRE_TYPE = {}".format(msg_id)
|
yield " MESSAGE_WIRE_TYPE = {}".format(msg_id)
|
||||||
|
|
||||||
|
if unstable is not None:
|
||||||
|
yield " UNSTABLE = True"
|
||||||
|
|
||||||
if fields:
|
if fields:
|
||||||
yield ""
|
yield ""
|
||||||
yield from self.create_init_method(fields)
|
yield from self.create_init_method(fields)
|
||||||
|
@ -13,6 +13,7 @@ if __debug__:
|
|||||||
|
|
||||||
class AuthorizeCoinJoin(p.MessageType):
|
class AuthorizeCoinJoin(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 51
|
MESSAGE_WIRE_TYPE = 51
|
||||||
|
UNSTABLE = True
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -13,6 +13,7 @@ if __debug__:
|
|||||||
|
|
||||||
class AuthorizeCoinJoin(p.MessageType):
|
class AuthorizeCoinJoin(p.MessageType):
|
||||||
MESSAGE_WIRE_TYPE = 51
|
MESSAGE_WIRE_TYPE = 51
|
||||||
|
UNSTABLE = True
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
Loading…
Reference in New Issue
Block a user