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.
This commit is contained in:
1 parent
8c61374ba7
commit
292b1a3e9c
7 files changed
+54
-7
No files matched your search
@@ -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()
|
||||
Reference in new issue
Block a user