mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-29 19:08:12 +00:00
tests: fix segwit tests using preimage_hash
This commit is contained in:
parent
dfd02821af
commit
7f36185ab3
@ -91,7 +91,7 @@ class TestSegwitBip143NativeP2WPKH(unittest.TestCase):
|
||||
|
||||
# test data public key hash
|
||||
# only for input 2 - input 1 is not segwit
|
||||
result = bip143.preimage_hash(self.tx, self.inp2, unhexlify('1d0f172a0ecb48aee1be1f2687d2963ae33f71a1'), 0x01)
|
||||
result = bip143.preimage_hash(coin, self.tx, self.inp2, unhexlify('1d0f172a0ecb48aee1be1f2687d2963ae33f71a1'), 0x01)
|
||||
self.assertEqual(hexlify(result), b'c37af31116d1b27caf68aae9e3ac82f1477929014d5b917657d0eb49478cb670')
|
||||
|
||||
|
||||
|
@ -77,7 +77,7 @@ class TestSegwitBip143(unittest.TestCase):
|
||||
bip143.add_output(txo_bin)
|
||||
|
||||
# test data public key hash
|
||||
result = bip143.preimage_hash(self.tx, self.inp1, unhexlify('79091972186c449eb1ded22b78e40d009bdf0089'), 0x01)
|
||||
result = bip143.preimage_hash(coin, self.tx, self.inp1, unhexlify('79091972186c449eb1ded22b78e40d009bdf0089'), 0x01)
|
||||
self.assertEqual(hexlify(result), b'64f3b0f4dd2bb3aa1ce8566d220cc74dda9df97d8490cc81d89d735c92e59fb6')
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user