forked from Qortal/qortal
Moved block minter sleep to later in the process, otherwise it can remain there for longer than expected.
This commit is contained in:
parent
816b01c1fc
commit
a4cbbb3868
@ -118,14 +118,6 @@ public class BlockMinter extends Thread {
|
|||||||
if (mintingAccountsData.isEmpty())
|
if (mintingAccountsData.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (parentSignatureForLastLowWeightBlock != null) {
|
|
||||||
// The last iteration found a higher weight block in the network, so sleep for a while
|
|
||||||
// to allow is to sync the higher weight chain. We are sleeping here rather than when
|
|
||||||
// detected as we don't want to hold the blockchain lock open.
|
|
||||||
LOGGER.info("Sleeping for 10 seconds...");
|
|
||||||
Thread.sleep(10 * 1000L);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disregard minting accounts that are no longer valid, e.g. by transfer/loss of founder flag or account level
|
// Disregard minting accounts that are no longer valid, e.g. by transfer/loss of founder flag or account level
|
||||||
// Note that minting accounts are actually reward-shares in Qortal
|
// Note that minting accounts are actually reward-shares in Qortal
|
||||||
Iterator<MintingAccountData> madi = mintingAccountsData.iterator();
|
Iterator<MintingAccountData> madi = mintingAccountsData.iterator();
|
||||||
@ -219,6 +211,14 @@ public class BlockMinter extends Thread {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parentSignatureForLastLowWeightBlock != null) {
|
||||||
|
// The last iteration found a higher weight block in the network, so sleep for a while
|
||||||
|
// to allow is to sync the higher weight chain. We are sleeping here rather than when
|
||||||
|
// detected as we don't want to hold the blockchain lock open.
|
||||||
|
LOGGER.info("Sleeping for 10 seconds...");
|
||||||
|
Thread.sleep(10 * 1000L);
|
||||||
|
}
|
||||||
|
|
||||||
for (PrivateKeyAccount mintingAccount : newBlocksMintingAccounts) {
|
for (PrivateKeyAccount mintingAccount : newBlocksMintingAccounts) {
|
||||||
// First block does the AT heavy-lifting
|
// First block does the AT heavy-lifting
|
||||||
if (newBlocks.isEmpty()) {
|
if (newBlocks.isEmpty()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user