From 6ff4b41f2ea3764807d70df93edf981778cec871 Mon Sep 17 00:00:00 2001 From: AntiochP <30642645+antiochp@users.noreply.github.com> Date: Mon, 18 Dec 2017 20:33:44 -0500 Subject: [PATCH] 100_000 keys max in a wallet (was 10_000) and someone maxed this out... (#520) --- keychain/src/keychain.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/keychain/src/keychain.rs b/keychain/src/keychain.rs index 3ec31b477..678e6f931 100644 --- a/keychain/src/keychain.rs +++ b/keychain/src/keychain.rs @@ -117,10 +117,11 @@ impl Keychain { // otherwise iterate over a large number of derivations looking for our key // cache the resulting derivations by key_id for faster lookup later - // TODO - remove the 10k hard limit and be smarter about batching somehow + // TODO - remove hard limit (within reason) + // TODO - do we benefit here if we track our max known n_child? { let mut cache = self.key_derivation_cache.write().unwrap(); - for i in 1..10_000 { + for i in 1..100_000 { let extkey = self.extkey.derive(&self.secp, i)?; let extkey_id = extkey.identifier(&self.secp)?;