forked from Qortal/qortal
Give founder accounts as an effective minting level of 0 if they have a penalty.
This commit is contained in:
parent
5f0263c078
commit
6ea3c0e6f7
@ -211,7 +211,8 @@ public class Account {
|
|||||||
if (level != null && level >= BlockChain.getInstance().getMinAccountLevelToMint())
|
if (level != null && level >= BlockChain.getInstance().getMinAccountLevelToMint())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (Account.isFounder(accountData.getFlags()))
|
// Founders can always mint, unless they have a penalty
|
||||||
|
if (Account.isFounder(accountData.getFlags()) && accountData.getBlocksMintedPenalty() == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -243,7 +244,7 @@ public class Account {
|
|||||||
if (level != null && level >= BlockChain.getInstance().getMinAccountLevelToRewardShare())
|
if (level != null && level >= BlockChain.getInstance().getMinAccountLevelToRewardShare())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (Account.isFounder(accountData.getFlags()))
|
if (Account.isFounder(accountData.getFlags()) && accountData.getBlocksMintedPenalty() == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -271,7 +272,7 @@ public class Account {
|
|||||||
/**
|
/**
|
||||||
* Returns 'effective' minting level, or zero if account does not exist/cannot mint.
|
* Returns 'effective' minting level, or zero if account does not exist/cannot mint.
|
||||||
* <p>
|
* <p>
|
||||||
* For founder accounts, this returns "founderEffectiveMintingLevel" from blockchain config.
|
* For founder accounts with no penalty, this returns "founderEffectiveMintingLevel" from blockchain config.
|
||||||
*
|
*
|
||||||
* @return 0+
|
* @return 0+
|
||||||
* @throws DataException
|
* @throws DataException
|
||||||
@ -281,7 +282,8 @@ public class Account {
|
|||||||
if (accountData == null)
|
if (accountData == null)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (Account.isFounder(accountData.getFlags()))
|
// Founders are assigned a different effective minting level, as long as they have no penalty
|
||||||
|
if (Account.isFounder(accountData.getFlags()) && accountData.getBlocksMintedPenalty() == 0)
|
||||||
return BlockChain.getInstance().getFounderEffectiveMintingLevel();
|
return BlockChain.getInstance().getFounderEffectiveMintingLevel();
|
||||||
|
|
||||||
return accountData.getLevel();
|
return accountData.getLevel();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user