mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-26 07:23:53 +01:00
Assert on lock.isHeldByCurrentThread() instead of isLocked() - the latter is not correct.
This didn't cause any actual bugs but just reduced the safety of making code changes.
This commit is contained in:
parent
e687e52230
commit
4e95ab3cfc
5 changed files with 28 additions and 28 deletions
|
@ -399,7 +399,7 @@ public abstract class AbstractBlockChain {
|
||||||
private void connectBlock(final Block block, StoredBlock storedPrev, boolean expensiveChecks,
|
private void connectBlock(final Block block, StoredBlock storedPrev, boolean expensiveChecks,
|
||||||
@Nullable final List<Sha256Hash> filteredTxHashList,
|
@Nullable final List<Sha256Hash> filteredTxHashList,
|
||||||
@Nullable final Map<Sha256Hash, Transaction> filteredTxn) throws BlockStoreException, VerificationException, PrunedException {
|
@Nullable final Map<Sha256Hash, Transaction> filteredTxn) throws BlockStoreException, VerificationException, PrunedException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
boolean filtered = filteredTxHashList != null && filteredTxn != null;
|
boolean filtered = filteredTxHashList != null && filteredTxn != null;
|
||||||
boolean fullBlock = block.transactions != null && !filtered;
|
boolean fullBlock = block.transactions != null && !filtered;
|
||||||
// If !filtered and !fullBlock then we have just a header.
|
// If !filtered and !fullBlock then we have just a header.
|
||||||
|
@ -576,7 +576,7 @@ public abstract class AbstractBlockChain {
|
||||||
*/
|
*/
|
||||||
private void handleNewBestChain(StoredBlock storedPrev, StoredBlock newChainHead, Block block, boolean expensiveChecks)
|
private void handleNewBestChain(StoredBlock storedPrev, StoredBlock newChainHead, Block block, boolean expensiveChecks)
|
||||||
throws BlockStoreException, VerificationException, PrunedException {
|
throws BlockStoreException, VerificationException, PrunedException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
// This chain has overtaken the one we currently believe is best. Reorganize is required.
|
// This chain has overtaken the one we currently believe is best. Reorganize is required.
|
||||||
//
|
//
|
||||||
// Firstly, calculate the block at which the chain diverged. We only need to examine the
|
// Firstly, calculate the block at which the chain diverged. We only need to examine the
|
||||||
|
@ -733,7 +733,7 @@ public abstract class AbstractBlockChain {
|
||||||
* For each block in orphanBlocks, see if we can now fit it on top of the chain and if so, do so.
|
* For each block in orphanBlocks, see if we can now fit it on top of the chain and if so, do so.
|
||||||
*/
|
*/
|
||||||
private void tryConnectingOrphans() throws VerificationException, BlockStoreException, PrunedException {
|
private void tryConnectingOrphans() throws VerificationException, BlockStoreException, PrunedException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
// For each block in our orphan list, try and fit it onto the head of the chain. If we succeed remove it
|
// For each block in our orphan list, try and fit it onto the head of the chain. If we succeed remove it
|
||||||
// from the list and keep going. If we changed the head of the list at the end of the round try again until
|
// from the list and keep going. If we changed the head of the list at the end of the round try again until
|
||||||
// we can't fit anything else on the top.
|
// we can't fit anything else on the top.
|
||||||
|
@ -773,7 +773,7 @@ public abstract class AbstractBlockChain {
|
||||||
* Throws an exception if the blocks difficulty is not correct.
|
* Throws an exception if the blocks difficulty is not correct.
|
||||||
*/
|
*/
|
||||||
private void checkDifficultyTransitions(StoredBlock storedPrev, Block nextBlock) throws BlockStoreException, VerificationException {
|
private void checkDifficultyTransitions(StoredBlock storedPrev, Block nextBlock) throws BlockStoreException, VerificationException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
Block prev = storedPrev.getHeader();
|
Block prev = storedPrev.getHeader();
|
||||||
|
|
||||||
// Is this supposed to be a difficulty transition point?
|
// Is this supposed to be a difficulty transition point?
|
||||||
|
@ -842,7 +842,7 @@ public abstract class AbstractBlockChain {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkTestnetDifficulty(StoredBlock storedPrev, Block prev, Block next) throws VerificationException, BlockStoreException {
|
private void checkTestnetDifficulty(StoredBlock storedPrev, Block prev, Block next) throws VerificationException, BlockStoreException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
// After 15th February 2012 the rules on the testnet change to avoid people running up the difficulty
|
// After 15th February 2012 the rules on the testnet change to avoid people running up the difficulty
|
||||||
// and then leaving, making it too hard to mine a block. On non-difficulty transition points, easy
|
// and then leaving, making it too hard to mine a block. On non-difficulty transition points, easy
|
||||||
// blocks are allowed if there has been a span of 20 minutes without one.
|
// blocks are allowed if there has been a span of 20 minutes without one.
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class FullPrunedBlockChain extends AbstractBlockChain {
|
||||||
@Override
|
@Override
|
||||||
protected TransactionOutputChanges connectTransactions(int height, Block block)
|
protected TransactionOutputChanges connectTransactions(int height, Block block)
|
||||||
throws VerificationException, BlockStoreException {
|
throws VerificationException, BlockStoreException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
if (block.transactions == null)
|
if (block.transactions == null)
|
||||||
throw new RuntimeException("connectTransactions called with Block that didn't have transactions!");
|
throw new RuntimeException("connectTransactions called with Block that didn't have transactions!");
|
||||||
if (!params.passesCheckpoint(height, block.getHash()))
|
if (!params.passesCheckpoint(height, block.getHash()))
|
||||||
|
@ -255,7 +255,7 @@ public class FullPrunedBlockChain extends AbstractBlockChain {
|
||||||
*/
|
*/
|
||||||
protected synchronized TransactionOutputChanges connectTransactions(StoredBlock newBlock)
|
protected synchronized TransactionOutputChanges connectTransactions(StoredBlock newBlock)
|
||||||
throws VerificationException, BlockStoreException, PrunedException {
|
throws VerificationException, BlockStoreException, PrunedException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
if (!params.passesCheckpoint(newBlock.getHeight(), newBlock.getHeader().getHash()))
|
if (!params.passesCheckpoint(newBlock.getHeight(), newBlock.getHeader().getHash()))
|
||||||
throw new VerificationException("Block failed checkpoint lockin at " + newBlock.getHeight());
|
throw new VerificationException("Block failed checkpoint lockin at " + newBlock.getHeight());
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ public class FullPrunedBlockChain extends AbstractBlockChain {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void disconnectTransactions(StoredBlock oldBlock) throws PrunedException, BlockStoreException {
|
protected void disconnectTransactions(StoredBlock oldBlock) throws PrunedException, BlockStoreException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
blockStore.beginDatabaseBatchWrite();
|
blockStore.beginDatabaseBatchWrite();
|
||||||
try {
|
try {
|
||||||
StoredUndoableBlock undoBlock = blockStore.getUndoBlock(oldBlock.getHeader().getHash());
|
StoredUndoableBlock undoBlock = blockStore.getUndoBlock(oldBlock.getHeader().getHash());
|
||||||
|
@ -413,7 +413,7 @@ public class FullPrunedBlockChain extends AbstractBlockChain {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doSetChainHead(StoredBlock chainHead) throws BlockStoreException {
|
protected void doSetChainHead(StoredBlock chainHead) throws BlockStoreException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
blockStore.setVerifiedChainHead(chainHead);
|
blockStore.setVerifiedChainHead(chainHead);
|
||||||
blockStore.commitDatabaseBatchWrite();
|
blockStore.commitDatabaseBatchWrite();
|
||||||
}
|
}
|
||||||
|
@ -425,7 +425,7 @@ public class FullPrunedBlockChain extends AbstractBlockChain {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected StoredBlock getStoredBlockInCurrentScope(Sha256Hash hash) throws BlockStoreException {
|
protected StoredBlock getStoredBlockInCurrentScope(Sha256Hash hash) throws BlockStoreException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
return blockStore.getOnceUndoableStoredBlock(hash);
|
return blockStore.getOnceUndoableStoredBlock(hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,7 +266,7 @@ public class MemoryPool {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void markBroadcast(PeerAddress byPeer, Transaction tx) {
|
private void markBroadcast(PeerAddress byPeer, Transaction tx) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
final TransactionConfidence confidence = tx.getConfidence();
|
final TransactionConfidence confidence = tx.getConfidence();
|
||||||
confidence.markBroadcastBy(byPeer);
|
confidence.markBroadcastBy(byPeer);
|
||||||
confidence.queueListeners(TransactionConfidence.Listener.ChangeReason.SEEN_PEERS);
|
confidence.queueListeners(TransactionConfidence.Listener.ChangeReason.SEEN_PEERS);
|
||||||
|
|
|
@ -884,7 +884,7 @@ public class PeerGroup extends AbstractIdleService implements TransactionBroadca
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupPingingForNewPeer(final Peer peer) {
|
private void setupPingingForNewPeer(final Peer peer) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
if (peer.getPeerVersionMessage().clientVersion < Pong.MIN_PROTOCOL_VERSION)
|
if (peer.getPeerVersionMessage().clientVersion < Pong.MIN_PROTOCOL_VERSION)
|
||||||
return;
|
return;
|
||||||
if (getPingIntervalMsec() <= 0)
|
if (getPingIntervalMsec() <= 0)
|
||||||
|
@ -930,7 +930,7 @@ public class PeerGroup extends AbstractIdleService implements TransactionBroadca
|
||||||
/** Returns true if at least one peer received an inv. */
|
/** Returns true if at least one peer received an inv. */
|
||||||
private boolean announcePendingWalletTransactions(List<Wallet> announceWallets,
|
private boolean announcePendingWalletTransactions(List<Wallet> announceWallets,
|
||||||
List<Peer> announceToPeers) {
|
List<Peer> announceToPeers) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
// Build up an inv announcing the hashes of all pending transactions in all our wallets.
|
// Build up an inv announcing the hashes of all pending transactions in all our wallets.
|
||||||
InventoryMessage inv = new InventoryMessage(params);
|
InventoryMessage inv = new InventoryMessage(params);
|
||||||
for (Wallet w : announceWallets) {
|
for (Wallet w : announceWallets) {
|
||||||
|
|
|
@ -765,7 +765,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
* the double spent inputs are not ours. Returns the pending tx that was double spent or null if none found.
|
* the double spent inputs are not ours. Returns the pending tx that was double spent or null if none found.
|
||||||
*/
|
*/
|
||||||
private boolean checkForDoubleSpendAgainstPending(Transaction tx, boolean takeAction) {
|
private boolean checkForDoubleSpendAgainstPending(Transaction tx, boolean takeAction) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
// Compile a set of outpoints that are spent by tx.
|
// Compile a set of outpoints that are spent by tx.
|
||||||
HashSet<TransactionOutPoint> outpoints = new HashSet<TransactionOutPoint>();
|
HashSet<TransactionOutPoint> outpoints = new HashSet<TransactionOutPoint>();
|
||||||
for (TransactionInput input : tx.getInputs()) {
|
for (TransactionInput input : tx.getInputs()) {
|
||||||
|
@ -824,7 +824,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
|
|
||||||
private void receive(Transaction tx, StoredBlock block, BlockChain.NewBlockType blockType) throws VerificationException {
|
private void receive(Transaction tx, StoredBlock block, BlockChain.NewBlockType blockType) throws VerificationException {
|
||||||
// Runs in a peer thread.
|
// Runs in a peer thread.
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
BigInteger prevBalance = getBalance();
|
BigInteger prevBalance = getBalance();
|
||||||
Sha256Hash txHash = tx.getHash();
|
Sha256Hash txHash = tx.getHash();
|
||||||
boolean bestChain = blockType == BlockChain.NewBlockType.BEST_CHAIN;
|
boolean bestChain = blockType == BlockChain.NewBlockType.BEST_CHAIN;
|
||||||
|
@ -989,7 +989,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
* re-org. Places the tx into the right pool, handles coinbase transactions, handles double-spends and so on.
|
* re-org. Places the tx into the right pool, handles coinbase transactions, handles double-spends and so on.
|
||||||
*/
|
*/
|
||||||
private void processTxFromBestChain(Transaction tx) throws VerificationException {
|
private void processTxFromBestChain(Transaction tx) throws VerificationException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
checkState(!pending.containsKey(tx.getHash()));
|
checkState(!pending.containsKey(tx.getHash()));
|
||||||
|
|
||||||
// This TX may spend our existing outputs even though it was not pending. This can happen in unit
|
// This TX may spend our existing outputs even though it was not pending. This can happen in unit
|
||||||
|
@ -1049,7 +1049,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
* @param fromChain If true, the tx appeared on the current best chain, if false it was pending.
|
* @param fromChain If true, the tx appeared on the current best chain, if false it was pending.
|
||||||
*/
|
*/
|
||||||
private void updateForSpends(Transaction tx, boolean fromChain) throws VerificationException {
|
private void updateForSpends(Transaction tx, boolean fromChain) throws VerificationException {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
if (fromChain)
|
if (fromChain)
|
||||||
checkState(!pending.containsKey(tx.getHash()));
|
checkState(!pending.containsKey(tx.getHash()));
|
||||||
for (TransactionInput input : tx.getInputs()) {
|
for (TransactionInput input : tx.getInputs()) {
|
||||||
|
@ -1160,7 +1160,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
* If the owned transactions outputs are not all marked as spent, and it's in the spent map, move it.
|
* If the owned transactions outputs are not all marked as spent, and it's in the spent map, move it.
|
||||||
*/
|
*/
|
||||||
private void maybeMovePool(Transaction tx, String context) {
|
private void maybeMovePool(Transaction tx, String context) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
if (tx.isEveryOwnedOutputSpent(this)) {
|
if (tx.isEveryOwnedOutputSpent(this)) {
|
||||||
// There's nothing left I can spend in this transaction.
|
// There's nothing left I can spend in this transaction.
|
||||||
if (unspent.remove(tx.getHash()) != null) {
|
if (unspent.remove(tx.getHash()) != null) {
|
||||||
|
@ -1330,7 +1330,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
* Adds the given transaction to the given pools and registers a confidence change listener on it.
|
* Adds the given transaction to the given pools and registers a confidence change listener on it.
|
||||||
*/
|
*/
|
||||||
private void addWalletTransaction(Pool pool, Transaction tx) {
|
private void addWalletTransaction(Pool pool, Transaction tx) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
switch (pool) {
|
switch (pool) {
|
||||||
case UNSPENT:
|
case UNSPENT:
|
||||||
checkState(unspent.put(tx.getHash(), tx) == null);
|
checkState(unspent.put(tx.getHash(), tx) == null);
|
||||||
|
@ -1881,7 +1881,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
}
|
}
|
||||||
|
|
||||||
private LinkedList<TransactionOutput> calculateSpendCandidates(boolean excludeImmatureCoinbases) {
|
private LinkedList<TransactionOutput> calculateSpendCandidates(boolean excludeImmatureCoinbases) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
LinkedList<TransactionOutput> candidates = Lists.newLinkedList();
|
LinkedList<TransactionOutput> candidates = Lists.newLinkedList();
|
||||||
for (Transaction tx : Iterables.concat(unspent.values(), pending.values())) {
|
for (Transaction tx : Iterables.concat(unspent.values(), pending.values())) {
|
||||||
// Do not try and spend coinbases that were mined too recently, the protocol forbids it.
|
// Do not try and spend coinbases that were mined too recently, the protocol forbids it.
|
||||||
|
@ -2139,7 +2139,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
|
|
||||||
private void toStringHelper(StringBuilder builder, Map<Sha256Hash, Transaction> transactionMap,
|
private void toStringHelper(StringBuilder builder, Map<Sha256Hash, Transaction> transactionMap,
|
||||||
AbstractBlockChain chain) {
|
AbstractBlockChain chain) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
for (Transaction tx : transactionMap.values()) {
|
for (Transaction tx : transactionMap.values()) {
|
||||||
try {
|
try {
|
||||||
builder.append("Sends ");
|
builder.append("Sends ");
|
||||||
|
@ -2838,7 +2838,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
|
|
||||||
// Runs any balance futures in the user code thread.
|
// Runs any balance futures in the user code thread.
|
||||||
private void checkBalanceFuturesLocked(@Nullable BigInteger avail) {
|
private void checkBalanceFuturesLocked(@Nullable BigInteger avail) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
BigInteger estimated = null;
|
BigInteger estimated = null;
|
||||||
final ListIterator<BalanceFutureRequest> it = balanceFutureRequests.listIterator();
|
final ListIterator<BalanceFutureRequest> it = balanceFutureRequests.listIterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
|
@ -2937,7 +2937,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
// anything and hold no locks).
|
// anything and hold no locks).
|
||||||
|
|
||||||
private void queueOnTransactionConfidenceChanged(final Transaction tx) {
|
private void queueOnTransactionConfidenceChanged(final Transaction tx) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
||||||
registration.executor.execute(new Runnable() {
|
registration.executor.execute(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -2951,7 +2951,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
private void maybeQueueOnWalletChanged() {
|
private void maybeQueueOnWalletChanged() {
|
||||||
// Don't invoke the callback in some circumstances, eg, whilst we are re-organizing or fiddling with
|
// Don't invoke the callback in some circumstances, eg, whilst we are re-organizing or fiddling with
|
||||||
// transactions due to a new block arriving. It will be called later instead.
|
// transactions due to a new block arriving. It will be called later instead.
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
checkState(onWalletChangedSuppressions >= 0);
|
checkState(onWalletChangedSuppressions >= 0);
|
||||||
if (onWalletChangedSuppressions > 0) return;
|
if (onWalletChangedSuppressions > 0) return;
|
||||||
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
||||||
|
@ -2965,7 +2965,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
}
|
}
|
||||||
|
|
||||||
private void queueOnCoinsReceived(final Transaction tx, final BigInteger balance, final BigInteger newBalance) {
|
private void queueOnCoinsReceived(final Transaction tx, final BigInteger balance, final BigInteger newBalance) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
||||||
registration.executor.execute(new Runnable() {
|
registration.executor.execute(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -2977,7 +2977,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
}
|
}
|
||||||
|
|
||||||
private void queueOnCoinsSent(final Transaction tx, final BigInteger prevBalance, final BigInteger newBalance) {
|
private void queueOnCoinsSent(final Transaction tx, final BigInteger prevBalance, final BigInteger newBalance) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
||||||
registration.executor.execute(new Runnable() {
|
registration.executor.execute(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -2989,7 +2989,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
}
|
}
|
||||||
|
|
||||||
private void queueOnReorganize() {
|
private void queueOnReorganize() {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
checkState(insideReorg);
|
checkState(insideReorg);
|
||||||
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
||||||
registration.executor.execute(new Runnable() {
|
registration.executor.execute(new Runnable() {
|
||||||
|
@ -3002,7 +3002,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||||
}
|
}
|
||||||
|
|
||||||
private void queueOnKeysAdded(final List<ECKey> keys) {
|
private void queueOnKeysAdded(final List<ECKey> keys) {
|
||||||
checkState(lock.isLocked());
|
checkState(lock.isHeldByCurrentThread());
|
||||||
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
for (final ListenerRegistration<WalletEventListener> registration : eventListeners) {
|
||||||
registration.executor.execute(new Runnable() {
|
registration.executor.execute(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue