Ensure that a bogus signature will always be created for ignored inputs

Fixes the issue where multisig inputs not belonging to the trezor
would cause an error. Also re-enables that test for the trezor
This commit is contained in:
Andrew Chow 2019-01-11 13:40:03 -05:00
parent 3e8073c123
commit c54bc33381
2 changed files with 3 additions and 2 deletions

View File

@ -131,6 +131,8 @@ class TrezorClient(HardwareWalletClient):
def ignore_input():
txinputtype.address_n = [0x80000000]
txinputtype.multisig = None
txinputtype.script_type = proto.InputScriptType.SPENDWITNESS
inputs.append(txinputtype)
to_ignore.append(input_num)

View File

@ -321,8 +321,7 @@ class TestSignTx(DeviceTestCase):
psbt = self.wrpc.walletcreatefundedpsbt([], [{self.wpk_rpc.getnewaddress():(i+1)*send_amount}], 0, {'includeWatching': True, 'subtractFeeFromOutputs': [0]}, True)
# Sign with unknown inputs in two steps
if self.type is not 'trezor': # https://github.com/achow101/HWI/issues/100
self._generate_and_finalize(True, psbt)
self._generate_and_finalize(True, psbt)
# Sign all inputs all at once
final_tx = self._generate_and_finalize(False, psbt)