1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 13:38:12 +00:00

vendor: update trezor-common, use Tx.version_group_id where possible

This commit is contained in:
Pavol Rusnak 2018-10-15 17:51:32 +02:00
parent 3f92683bc6
commit 837781eb55
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
4 changed files with 10 additions and 3 deletions

View File

@ -90,6 +90,7 @@ def sign_tx(
lock_time=None,
expiry=None,
overwintered=None,
version_group_id=None,
debug_processor=None,
):
# start = time.time()
@ -108,6 +109,8 @@ def sign_tx(
tx.expiry = expiry
if overwintered is not None:
tx.overwintered = overwintered
if version_group_id is not None:
tx.version_group_id = version_group_id
res = client.call(tx)
# Prepare structure for signatures

View File

@ -84,6 +84,7 @@ class TestMsgSigntxZcash(TrezorTest):
[out1],
version=3,
overwintered=True,
version_group_id=0x3C48270,
)
# Accepted by network: tx eda9b772c47f0c29310759960e0081c98707aa67a0a2738bcc71439fcf360675

View File

@ -97,6 +97,11 @@ class TxApiInsight(TxApi):
if self.decred:
t.expiry = data["expiry"]
if self.zcash:
t.overwintered = data.get("fOverwintered", False)
t.expiry = data.get("nExpiryHeight", None)
t.version_group_id = data.get("nVersionGroupId", None)
for vin in data["vin"]:
i = t._add_inputs()
if "coinbase" in vin.keys():
@ -131,8 +136,6 @@ class TxApiInsight(TxApi):
o.decred_script_version = vout["version"]
if self.zcash:
t.overwintered = data.get("fOverwintered", False)
t.expiry = data.get("nExpiryHeight", False)
if t.version >= 2:
joinsplit_cnt = len(data["vjoinsplit"])
if joinsplit_cnt == 0:

@ -1 +1 @@
Subproject commit 41e4a84b5b01d03e980f84fab29c8f0b0ec948f5
Subproject commit 95ffa894c8808dd9a66cd6c88f434a241a43de91