mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 20:11:00 +00:00
change logic of recovery
This commit is contained in:
parent
aec4908fd7
commit
a0d73b25fe
@ -25,7 +25,7 @@ class TestDeviceRecovery(common.TrezorTest):
|
|||||||
ret = self.client.call_raw(proto.PinMatrixAck(pin=pin_encoded))
|
ret = self.client.call_raw(proto.PinMatrixAck(pin=pin_encoded))
|
||||||
|
|
||||||
fakes = 0
|
fakes = 0
|
||||||
for _ in range(int(12 * 1.5)):
|
for _ in range(int(12 * 2)):
|
||||||
self.assertIsInstance(ret, proto.WordRequest)
|
self.assertIsInstance(ret, proto.WordRequest)
|
||||||
(word, pos) = self.client.debug.read_recovery_word()
|
(word, pos) = self.client.debug.read_recovery_word()
|
||||||
|
|
||||||
@ -41,8 +41,8 @@ class TestDeviceRecovery(common.TrezorTest):
|
|||||||
# Workflow succesfully ended
|
# Workflow succesfully ended
|
||||||
self.assertIsInstance(ret, proto.Success)
|
self.assertIsInstance(ret, proto.Success)
|
||||||
|
|
||||||
# 6 expected fake words and all words of mnemonic are used
|
# 12 expected fake words and all words of mnemonic are used
|
||||||
self.assertEqual(fakes, 6)
|
self.assertEqual(fakes, 12)
|
||||||
self.assertEqual(mnemonic, [None] * 12)
|
self.assertEqual(mnemonic, [None] * 12)
|
||||||
|
|
||||||
# Mnemonic is the same
|
# Mnemonic is the same
|
||||||
@ -72,7 +72,7 @@ class TestDeviceRecovery(common.TrezorTest):
|
|||||||
enforce_wordlist=True))
|
enforce_wordlist=True))
|
||||||
|
|
||||||
fakes = 0
|
fakes = 0
|
||||||
for _ in range(int(12 * 1.5)):
|
for _ in range(int(12 * 2)):
|
||||||
self.assertIsInstance(ret, proto.WordRequest)
|
self.assertIsInstance(ret, proto.WordRequest)
|
||||||
(word, pos) = self.client.debug.read_recovery_word()
|
(word, pos) = self.client.debug.read_recovery_word()
|
||||||
|
|
||||||
@ -88,8 +88,8 @@ class TestDeviceRecovery(common.TrezorTest):
|
|||||||
# Workflow succesfully ended
|
# Workflow succesfully ended
|
||||||
self.assertIsInstance(ret, proto.Success)
|
self.assertIsInstance(ret, proto.Success)
|
||||||
|
|
||||||
# 6 expected fake words and all words of mnemonic are used
|
# 12 expected fake words and all words of mnemonic are used
|
||||||
self.assertEqual(fakes, 6)
|
self.assertEqual(fakes, 12)
|
||||||
self.assertEqual(mnemonic, [None] * 12)
|
self.assertEqual(mnemonic, [None] * 12)
|
||||||
|
|
||||||
# Mnemonic is the same
|
# Mnemonic is the same
|
||||||
@ -116,7 +116,7 @@ class TestDeviceRecovery(common.TrezorTest):
|
|||||||
enforce_wordlist=True))
|
enforce_wordlist=True))
|
||||||
|
|
||||||
self.assertIsInstance(ret, proto.WordRequest)
|
self.assertIsInstance(ret, proto.WordRequest)
|
||||||
for _ in range(int(12 * 1.5)):
|
for _ in range(int(12 * 2)):
|
||||||
(word, pos) = self.client.debug.read_recovery_word()
|
(word, pos) = self.client.debug.read_recovery_word()
|
||||||
if pos != 0:
|
if pos != 0:
|
||||||
ret = self.client.call_raw(proto.WordAck(word='kwyjibo'))
|
ret = self.client.call_raw(proto.WordAck(word='kwyjibo'))
|
||||||
|
Loading…
Reference in New Issue
Block a user