Fix a wrong lock, spotted by Andreas

This commit is contained in:
Mike Hearn
2014-11-13 22:51:33 +01:00
parent b578adf55d
commit f65da9c201

View File

@@ -648,11 +648,11 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha
/** See {@link org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadSize(int)} for more info on this. */ /** See {@link org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadSize(int)} for more info on this. */
public void setKeychainLookaheadSize(int lookaheadSize) { public void setKeychainLookaheadSize(int lookaheadSize) {
lock.lock(); keychainLock.lock();
try { try {
keychain.setLookaheadSize(lookaheadSize); keychain.setLookaheadSize(lookaheadSize);
} finally { } finally {
lock.unlock(); keychainLock.unlock();
} }
} }