forked from Qortal/qortal
In Controller.processIncomingTransactionsQueue(), don't bother with 2nd-phase of locking blockchain and importing if there are no valid signature transactions to actually import
This commit is contained in:
parent
affd100298
commit
a9371f0a90
@ -847,7 +847,7 @@ public class Controller extends Thread {
|
||||
|
||||
private void processIncomingTransactionsQueue() {
|
||||
if (this.incomingTransactions.isEmpty()) {
|
||||
// Don't bother locking if there are no new transactions to process
|
||||
// Nothing to do?
|
||||
return;
|
||||
}
|
||||
|
||||
@ -912,6 +912,11 @@ public class Controller extends Thread {
|
||||
sigValidTransactions.add(transaction);
|
||||
}
|
||||
|
||||
if (sigValidTransactions.isEmpty()) {
|
||||
// Don't bother locking if there are no new transactions to process
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
ReentrantLock blockchainLock = Controller.getInstance().getBlockchainLock();
|
||||
if (!blockchainLock.tryLock(2, TimeUnit.SECONDS)) {
|
||||
|
Loading…
Reference in New Issue
Block a user