forked from Qortal/qortal
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),
|
||||
NAME_BLOCKED(97),
|
||||
GROUP_APPROVAL_REQUIRED(98),
|
||||
ACCOUNT_NOT_TRANSFERABLE(99),
|
||||
INVALID_BUT_OK(999),
|
||||
NOT_YET_RELEASED(1000);
|
||||
|
||||
|
@ -67,6 +67,11 @@ public class TransferPrivsTransaction extends Transaction {
|
||||
if (getSender().getConfirmedBalance(Asset.QORT) < this.transferPrivsTransactionData.getFee())
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user