3
0
mirror of https://github.com/Qortal/qortal.git synced 2025-02-12 10:15:49 +00:00

Level 0 online account removals moved inside feature trigger, so it is coordinated with the new validation.

This commit is contained in:
CalDescent 2022-12-05 21:34:26 +00:00
parent 51ad0a5b48
commit a69618133e

View File

@ -378,7 +378,8 @@ public class Block {
List<OnlineAccountData> onlineAccounts = OnlineAccountsManager.getInstance().getOnlineAccounts(onlineAccountsTimestamp);
onlineAccounts.removeIf(a -> a.getNonce() == null || a.getNonce() < 0);
// Remove any online accounts that are level 0
// After feature trigger, remove any online accounts that are level 0
if (height >= BlockChain.getInstance().getOnlineAccountMinterLevelValidationHeight()) {
onlineAccounts.removeIf(a -> {
try {
return Account.getRewardShareEffectiveMintingLevel(repository, a.getPublicKey()) == 0;
@ -387,6 +388,7 @@ public class Block {
return true;
}
});
}
if (onlineAccounts.isEmpty()) {
LOGGER.debug("No online accounts - not even our own?");