forked from Qortal/qortal
Fixed validation of existing reward share transactions.
This commit is contained in:
parent
166f9bd079
commit
6b45901c47
@ -76,7 +76,8 @@ public class BlockChain {
|
|||||||
disableReferenceTimestamp,
|
disableReferenceTimestamp,
|
||||||
increaseOnlineAccountsDifficultyTimestamp,
|
increaseOnlineAccountsDifficultyTimestamp,
|
||||||
onlineAccountMinterLevelValidationHeight,
|
onlineAccountMinterLevelValidationHeight,
|
||||||
selfSponsorshipAlgoV1Height;
|
selfSponsorshipAlgoV1Height,
|
||||||
|
feeValidationFixTimestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Custom transaction fees
|
// Custom transaction fees
|
||||||
@ -501,6 +502,10 @@ public class BlockChain {
|
|||||||
return this.featureTriggers.get(FeatureTrigger.onlineAccountMinterLevelValidationHeight.name()).intValue();
|
return this.featureTriggers.get(FeatureTrigger.onlineAccountMinterLevelValidationHeight.name()).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getFeeValidationFixTimestamp() {
|
||||||
|
return this.featureTriggers.get(FeatureTrigger.feeValidationFixTimestamp.name()).longValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// More complex getters for aspects that change by height or timestamp
|
// More complex getters for aspects that change by height or timestamp
|
||||||
|
|
||||||
|
@ -164,8 +164,13 @@ public class RewardShareTransaction extends Transaction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check creator has enough funds
|
// Check creator has enough funds
|
||||||
if (creator.getConfirmedBalance(Asset.QORT) < this.rewardShareTransactionData.getFee())
|
if (this.rewardShareTransactionData.getTimestamp() >= BlockChain.getInstance().getFeeValidationFixTimestamp())
|
||||||
return ValidationResult.NO_BALANCE;
|
if (creator.getConfirmedBalance(Asset.QORT) < this.rewardShareTransactionData.getFee())
|
||||||
|
return ValidationResult.NO_BALANCE;
|
||||||
|
|
||||||
|
else if (!(isRecipientAlsoMinter && existingRewardShareData == null))
|
||||||
|
if (creator.getConfirmedBalance(Asset.QORT) < this.rewardShareTransactionData.getFee())
|
||||||
|
return ValidationResult.NO_BALANCE;
|
||||||
|
|
||||||
return ValidationResult.OK;
|
return ValidationResult.OK;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,8 @@
|
|||||||
"disableReferenceTimestamp": 1655222400000,
|
"disableReferenceTimestamp": 1655222400000,
|
||||||
"increaseOnlineAccountsDifficultyTimestamp": 9999999999999,
|
"increaseOnlineAccountsDifficultyTimestamp": 9999999999999,
|
||||||
"onlineAccountMinterLevelValidationHeight": 1092000,
|
"onlineAccountMinterLevelValidationHeight": 1092000,
|
||||||
"selfSponsorshipAlgoV1Height": 1092400
|
"selfSponsorshipAlgoV1Height": 1092400,
|
||||||
|
"feeValidationFixTimestamp": 1671918000000
|
||||||
},
|
},
|
||||||
"genesisInfo": {
|
"genesisInfo": {
|
||||||
"version": 4,
|
"version": 4,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user