Log when BlockMinter fails to acquire blockchain lock after waiting

This commit is contained in:
catbref 2020-05-04 14:33:10 +01:00
parent 1bca152d9c
commit 44e8b3e6e7

View File

@ -177,8 +177,10 @@ public class BlockMinter extends Thread {
// Make sure we're the only thread modifying the blockchain
ReentrantLock blockchainLock = Controller.getInstance().getBlockchainLock();
if (!blockchainLock.tryLock(30, TimeUnit.SECONDS))
if (!blockchainLock.tryLock(30, TimeUnit.SECONDS)) {
LOGGER.warn("Couldn't acquire blockchain lock even after waiting 30 seconds");
continue;
}
boolean newBlockMinted = false;