From 4f252c6820426d4b186ea896e221a9fc60da54b3 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 15 Feb 2019 00:23:37 +0100 Subject: [PATCH] tests: update KMD device test --- trezorlib/tests/device_tests/test_msg_signtx_komodo.py | 4 +++- trezorlib/tests/device_tests/test_msg_signtx_zcash.py | 2 +- ...e229f65ebc3fa722016fcb9fbde7bc196d2d876604f5257ada19c.json | 1 + vendor/trezor-common | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 trezorlib/tests/txcache/insight_komodo_tx_339c3e78610e229f65ebc3fa722016fcb9fbde7bc196d2d876604f5257ada19c.json diff --git a/trezorlib/tests/device_tests/test_msg_signtx_komodo.py b/trezorlib/tests/device_tests/test_msg_signtx_komodo.py index 0410065ea..74eb9836a 100644 --- a/trezorlib/tests/device_tests/test_msg_signtx_komodo.py +++ b/trezorlib/tests/device_tests/test_msg_signtx_komodo.py @@ -22,7 +22,8 @@ from trezorlib.tools import parse_path from ..support.tx_cache import tx_cache from .common import TrezorTest -TX_API = tx_cache("Komodo") +# KMD has no usable backends, use cached TX only +TX_API = tx_cache("Komodo", allow_fetch=False) TXHASH_339c3e = bytes.fromhex( "339c3e78610e229f65ebc3fa722016fcb9fbde7bc196d2d876604f5257ada19c" @@ -82,6 +83,7 @@ class TestMsgSigntxKomodo(TrezorTest): overwintered=True, version_group_id=0x892F2085, branch_id=0x76B809BB, + lock_time=0x5C5CE16B, ) _, serialized_tx = btc.sign_tx( self.client, "Komodo", [inp1], [out1], details=details, prev_txes=TX_API diff --git a/trezorlib/tests/device_tests/test_msg_signtx_zcash.py b/trezorlib/tests/device_tests/test_msg_signtx_zcash.py index ae9d71049..098f73d1e 100644 --- a/trezorlib/tests/device_tests/test_msg_signtx_zcash.py +++ b/trezorlib/tests/device_tests/test_msg_signtx_zcash.py @@ -83,7 +83,7 @@ class TestMsgSigntxZcash(TrezorTest): details = proto.SignTx( version=3, overwintered=True, - version_group_id=0x3C48270, + version_group_id=0x03C48270, branch_id=0x5BA81B19, ) _, serialized_tx = btc.sign_tx( diff --git a/trezorlib/tests/txcache/insight_komodo_tx_339c3e78610e229f65ebc3fa722016fcb9fbde7bc196d2d876604f5257ada19c.json b/trezorlib/tests/txcache/insight_komodo_tx_339c3e78610e229f65ebc3fa722016fcb9fbde7bc196d2d876604f5257ada19c.json new file mode 100644 index 000000000..cc851aac0 --- /dev/null +++ b/trezorlib/tests/txcache/insight_komodo_tx_339c3e78610e229f65ebc3fa722016fcb9fbde7bc196d2d876604f5257ada19c.json @@ -0,0 +1 @@ +{"txid":"339c3e78610e229f65ebc3fa722016fcb9fbde7bc196d2d876604f5257ada19c","version":4,"locktime":1549590608,"vin":[{"txid":"d41f0d442bbd63597481e329f4189e57a2ef05c92ae48f05a6c96781b947e7ca","vout":1,"sequence":4294967295,"n":0,"scriptSig":{"hex":"483045022100f81c1b71036beab189c4a3bdc5bf34ea1dc86e3bc339e5e8928defb392477a0202204e10aede405ceec43adbf0efb3032469a61976561e86d81826da833e4fdfda1f01210235ad92bb4efda1e6794890f248fa26aab75906bd496c07a6a8532b62a5bd80f7","asm":"3045022100f81c1b71036beab189c4a3bdc5bf34ea1dc86e3bc339e5e8928defb392477a0202204e10aede405ceec43adbf0efb3032469a61976561e86d81826da833e4fdfda1f[ALL] 0235ad92bb4efda1e6794890f248fa26aab75906bd496c07a6a8532b62a5bd80f7"},"addr":"RDvyC66RQf7HKkUB5zyLKJhitV4ibzkKF5","valueSat":300000000,"value":3,"doubleSpentTxID":null}],"vout":[{"value":"2.99990000","n":0,"scriptPubKey":{"hex":"76a91433058d6bb20e9297fc0a518e2e0262e854496a6c88ac","asm":"OP_DUP OP_HASH160 33058d6bb20e9297fc0a518e2e0262e854496a6c OP_EQUALVERIFY OP_CHECKSIG","addresses":["RDvyC66RQf7HKkUB5zyLKJhitV4ibzkKF5"],"type":"pubkeyhash"},"spentTxId":"92b45f54cb7c3cdfc4a88dbf088dfcc7c1417ad0955f02712e136da7fd5343d6","spentIndex":0,"spentHeight":1219089}],"vjoinsplit":[],"blockhash":"013c24f1dad6561a786c512555b99180f92d785920165df6fadb264387a75489","blockheight":1219084,"confirmations":9868,"time":1549591478,"blocktime":1549591478,"valueOut":2.9999,"size":211,"valueIn":3,"fees":0.0001,"fOverwintered":true,"nVersionGroupId":2301567109,"nExpiryHeight":0,"valueBalance":0,"spendDescs":[],"outputDescs":[]} \ No newline at end of file diff --git a/vendor/trezor-common b/vendor/trezor-common index 0735c7d6f..d59e8caca 160000 --- a/vendor/trezor-common +++ b/vendor/trezor-common @@ -1 +1 @@ -Subproject commit 0735c7d6f524b4c5108d201c789612aad7ce7920 +Subproject commit d59e8caca8af77d998923ee635212281b7338b4d