diff options
author | amadeuszpawlik <apawlik@protonmail.com> | 2022-05-28 20:40:51 +0200 |
---|---|---|
committer | amadeuszpawlik <apawlik@protonmail.com> | 2022-06-09 20:34:46 +0200 |
commit | 292b1a3e9c98b9ba74b28d149df8554d4ad8e5c0 (patch) | |
tree | cbd0c09f79230f5d07ff0c3e03adf52825ad7959 /test/functional/rpc_signer.py | |
parent | 8c61374ba782bfd328741fb7a46f32581e524ef6 (diff) |
GetExternalSigner(): fail if multiple signers are found
If there are multiple external signers, `GetExternalSigner()` will
just pick the first one in the list. If the user has two or more
hardware wallets connected at the same time, he might not notice this.
This PR adds a check and fails with suitable message.
Diffstat (limited to 'test/functional/rpc_signer.py')
-rwxr-xr-x | test/functional/rpc_signer.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/functional/rpc_signer.py b/test/functional/rpc_signer.py index f1107197c5..de17b2b929 100755 --- a/test/functional/rpc_signer.py +++ b/test/functional/rpc_signer.py @@ -77,10 +77,7 @@ class RPCSignerTest(BitcoinTestFramework): ) self.clear_mock_result(self.nodes[1]) - result = self.nodes[1].enumeratesigners() - assert_equal(len(result['signers']), 2) - assert_equal(result['signers'][0]["fingerprint"], "00000001") - assert_equal(result['signers'][0]["name"], "trezor_t") + assert_equal({'fingerprint': '00000001', 'name': 'trezor_t'} in self.nodes[1].enumeratesigners()['signers'], True) if __name__ == '__main__': RPCSignerTest().main() |