From 7f36185ab31157effc6f3fc2ce373058096a6679 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 5 Jun 2018 16:54:36 +0200 Subject: [PATCH] tests: fix segwit tests using preimage_hash --- tests/test_apps.wallet.segwit.bip143.native_p2wpkh.py | 2 +- tests/test_apps.wallet.segwit.bip143.p2wpkh_in_p2sh.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_apps.wallet.segwit.bip143.native_p2wpkh.py b/tests/test_apps.wallet.segwit.bip143.native_p2wpkh.py index bc877b93d..916254c89 100644 --- a/tests/test_apps.wallet.segwit.bip143.native_p2wpkh.py +++ b/tests/test_apps.wallet.segwit.bip143.native_p2wpkh.py @@ -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') diff --git a/tests/test_apps.wallet.segwit.bip143.p2wpkh_in_p2sh.py b/tests/test_apps.wallet.segwit.bip143.p2wpkh_in_p2sh.py index b2bf861bf..fcab50d3d 100644 --- a/tests/test_apps.wallet.segwit.bip143.p2wpkh_in_p2sh.py +++ b/tests/test_apps.wallet.segwit.bip143.p2wpkh_in_p2sh.py @@ -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')