mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02:00
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:
@@ -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