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,
|
||||
increaseOnlineAccountsDifficultyTimestamp,
|
||||
onlineAccountMinterLevelValidationHeight,
|
||||
selfSponsorshipAlgoV1Height;
|
||||
selfSponsorshipAlgoV1Height,
|
||||
feeValidationFixTimestamp;
|
||||
}
|
||||
|
||||
// Custom transaction fees
|
||||
@ -501,6 +502,10 @@ public class BlockChain {
|
||||
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
|
||||
|
||||
|
@ -164,6 +164,11 @@ public class RewardShareTransaction extends Transaction {
|
||||
}
|
||||
|
||||
// Check creator has enough funds
|
||||
if (this.rewardShareTransactionData.getTimestamp() >= BlockChain.getInstance().getFeeValidationFixTimestamp())
|
||||
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;
|
||||
|
||||
|
@ -83,7 +83,8 @@
|
||||
"disableReferenceTimestamp": 1655222400000,
|
||||
"increaseOnlineAccountsDifficultyTimestamp": 9999999999999,
|
||||
"onlineAccountMinterLevelValidationHeight": 1092000,
|
||||
"selfSponsorshipAlgoV1Height": 1092400
|
||||
"selfSponsorshipAlgoV1Height": 1092400,
|
||||
"feeValidationFixTimestamp": 1671918000000
|
||||
},
|
||||
"genesisInfo": {
|
||||
"version": 4,
|
||||
|
Loading…
Reference in New Issue
Block a user