100_000 keys max in a wallet (was 10_000) and someone maxed this out... (#520)

This commit is contained in:
AntiochP 2017-12-18 20:33:44 -05:00 committed by GitHub
parent ea752d509b
commit 6ff4b41f2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)?;