HDW: Simplify an unusual for loop in DKC

This commit is contained in:
Mike Hearn 2014-08-11 14:17:21 +02:00
parent 53aa33c2e8
commit 00a276f906

View File

@ -357,8 +357,8 @@ public class DeterministicKeyChain implements EncryptableKeyChain {
basicKeyChain.importKeys(lookahead);
List<DeterministicKey> keys = new ArrayList<DeterministicKey>(numberOfKeys);
for (int i = 1; i <= numberOfKeys; i++) {
keys.add(hierarchy.get(HDUtils.append(parentKey.getPath(), new ChildNumber((index-numberOfKeys+i) - 1, false)), false, false));
for (int i = 0; i < numberOfKeys; i++) {
keys.add(hierarchy.get(HDUtils.append(parentKey.getPath(), new ChildNumber(index - numberOfKeys + i, false)), false, false));
}
return keys;
} finally {