mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-17 09:51:22 +00:00
Disallow TRANSFER_PRIVS transactions if the sending account has a penalty. Again, there will be no penalties until the algo runs, so it's safe without a feature trigger.
This commit is contained in:
parent
f14cc374c6
commit
f4d20e42f3
@ -245,6 +245,7 @@ public abstract class Transaction {
|
|||||||
ADDRESS_BLOCKED(96),
|
ADDRESS_BLOCKED(96),
|
||||||
NAME_BLOCKED(97),
|
NAME_BLOCKED(97),
|
||||||
GROUP_APPROVAL_REQUIRED(98),
|
GROUP_APPROVAL_REQUIRED(98),
|
||||||
|
ACCOUNT_NOT_TRANSFERABLE(99),
|
||||||
INVALID_BUT_OK(999),
|
INVALID_BUT_OK(999),
|
||||||
NOT_YET_RELEASED(1000);
|
NOT_YET_RELEASED(1000);
|
||||||
|
|
||||||
|
@ -67,6 +67,11 @@ public class TransferPrivsTransaction extends Transaction {
|
|||||||
if (getSender().getConfirmedBalance(Asset.QORT) < this.transferPrivsTransactionData.getFee())
|
if (getSender().getConfirmedBalance(Asset.QORT) < this.transferPrivsTransactionData.getFee())
|
||||||
return ValidationResult.NO_BALANCE;
|
return ValidationResult.NO_BALANCE;
|
||||||
|
|
||||||
|
// Check sender doesn't have a blocksMintedPenalty, as these accounts cannot be transferred
|
||||||
|
AccountData senderAccountData = this.repository.getAccountRepository().getAccount(getSender().getAddress());
|
||||||
|
if (senderAccountData == null || senderAccountData.getBlocksMintedPenalty() != 0)
|
||||||
|
return ValidationResult.ACCOUNT_NOT_TRANSFERABLE;
|
||||||
|
|
||||||
return ValidationResult.OK;
|
return ValidationResult.OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user