1
0

old_mnemonic: speed up mn_decode

mn_decode is used by mnemonic.make_seed which now takes around 25% less time
This commit is contained in:
SomberNight
2019-11-15 12:08:06 +01:00
parent bc4f22503f
commit 6ebbaa60ef
3 changed files with 10 additions and 8 deletions

View File

@@ -186,5 +186,6 @@ class Test_seeds(ElectrumTestCase):
self.assertTrue(is_old_seed("0123456789ABCDEF" * 4))
def test_seed_type(self):
for seed_words, _type in self.mnemonics:
self.assertEqual(_type, seed_type(seed_words), msg=seed_words)
for idx, (seed_words, _type) in enumerate(self.mnemonics):
with self.subTest(msg=f"seed_type_subcase_{idx}", seed_words=seed_words):
self.assertEqual(_type, seed_type(seed_words), msg=seed_words)