diff --git a/src/main/java/org/qortal/transaction/PublicizeTransaction.java b/src/main/java/org/qortal/transaction/PublicizeTransaction.java index c03c8283..7179576b 100644 --- a/src/main/java/org/qortal/transaction/PublicizeTransaction.java +++ b/src/main/java/org/qortal/transaction/PublicizeTransaction.java @@ -4,7 +4,9 @@ import java.util.Collections; import java.util.List; import org.qortal.account.Account; +import org.qortal.account.PublicKeyAccount; import org.qortal.api.resource.TransactionsResource.ConfirmationStatus; +import org.qortal.asset.Asset; import org.qortal.crypto.MemoryPoW; import org.qortal.data.transaction.PublicizeTransactionData; import org.qortal.data.transaction.TransactionData; @@ -102,6 +104,12 @@ public class PublicizeTransaction extends Transaction { if (!verifyNonce()) return ValidationResult.INCORRECT_NONCE; + // Validate fee if one has been included + PublicKeyAccount creator = this.getCreator(); + if (this.transactionData.getFee() > 0) + if (creator.getConfirmedBalance(Asset.QORT) < this.transactionData.getFee()) + return ValidationResult.NO_BALANCE; + return ValidationResult.OK; }