forked from Qortal/qortal
Restore missing minimum fee checks & ValidationResult
This commit is contained in:
parent
c69f84afab
commit
d741580ccf
@ -159,7 +159,7 @@ public abstract class Transaction {
|
|||||||
INVALID_TAGS_LENGTH(37),
|
INVALID_TAGS_LENGTH(37),
|
||||||
INVALID_AT_TYPE_LENGTH(38),
|
INVALID_AT_TYPE_LENGTH(38),
|
||||||
INVALID_AT_TRANSACTION(39),
|
INVALID_AT_TRANSACTION(39),
|
||||||
AT_IS_FINISHED(40),
|
INSUFFICIENT_FEE(40),
|
||||||
ASSET_DOES_NOT_MATCH_AT(41),
|
ASSET_DOES_NOT_MATCH_AT(41),
|
||||||
ASSET_ALREADY_EXISTS(43),
|
ASSET_ALREADY_EXISTS(43),
|
||||||
MISSING_CREATOR(44),
|
MISSING_CREATOR(44),
|
||||||
@ -189,6 +189,7 @@ public abstract class Transaction {
|
|||||||
TX_GROUP_ID_MISMATCH(68),
|
TX_GROUP_ID_MISMATCH(68),
|
||||||
MULTIPLE_NAMES_FORBIDDEN(69),
|
MULTIPLE_NAMES_FORBIDDEN(69),
|
||||||
INVALID_ASSET_OWNER(70),
|
INVALID_ASSET_OWNER(70),
|
||||||
|
AT_IS_FINISHED(71),
|
||||||
NOT_YET_RELEASED(1000);
|
NOT_YET_RELEASED(1000);
|
||||||
|
|
||||||
public final int value;
|
public final int value;
|
||||||
@ -477,6 +478,10 @@ public abstract class Transaction {
|
|||||||
if (this.transactionData.getTimestamp() > maxTimestamp)
|
if (this.transactionData.getTimestamp() > maxTimestamp)
|
||||||
return ValidationResult.TIMESTAMP_TOO_NEW;
|
return ValidationResult.TIMESTAMP_TOO_NEW;
|
||||||
|
|
||||||
|
// Check fee is sufficient
|
||||||
|
if (!hasMinimumFee() || !hasMinimumFeePerByte())
|
||||||
|
return ValidationResult.INSUFFICIENT_FEE;
|
||||||
|
|
||||||
repository.setSavepoint();
|
repository.setSavepoint();
|
||||||
try {
|
try {
|
||||||
PublicKeyAccount creator = this.getCreator();
|
PublicKeyAccount creator = this.getCreator();
|
||||||
|
Loading…
Reference in New Issue
Block a user