KeyChainGroup: remove the reduced lookahead for unit-tests

It turns out the effect on unit-test runtime is negligible these days.
This commit is contained in:
Andreas Schildbach 2022-07-31 17:15:37 +02:00
parent 295ce50782
commit d95e825112

View file

@ -28,7 +28,6 @@ import org.bitcoinj.crypto.ChildNumber;
import org.bitcoinj.crypto.DeterministicKey; import org.bitcoinj.crypto.DeterministicKey;
import org.bitcoinj.crypto.KeyCrypter; import org.bitcoinj.crypto.KeyCrypter;
import org.bitcoinj.crypto.KeyCrypterScrypt; import org.bitcoinj.crypto.KeyCrypterScrypt;
import org.bitcoinj.params.UnitTestParams;
import org.bitcoinj.script.Script; import org.bitcoinj.script.Script;
import org.bitcoinj.base.ScriptType; import org.bitcoinj.base.ScriptType;
import org.bitcoinj.script.ScriptBuilder; import org.bitcoinj.script.ScriptBuilder;
@ -263,8 +262,6 @@ public class KeyChainGroup implements KeyBag {
if (chains != null) { if (chains != null) {
if (lookaheadSize > -1) if (lookaheadSize > -1)
this.lookaheadSize = lookaheadSize; this.lookaheadSize = lookaheadSize;
else if (params.getId().equals(BitcoinNetwork.ID_UNITTESTNET))
this.lookaheadSize = 5; // Cut down excess computation for unit tests.
if (lookaheadThreshold > -1) if (lookaheadThreshold > -1)
this.lookaheadThreshold = lookaheadThreshold; this.lookaheadThreshold = lookaheadThreshold;
this.chains = new LinkedList<>(chains); this.chains = new LinkedList<>(chains);