forked from Qortal/qortal
Added cancelSellNameValidationTimestamp, to retroactively fix validation of some legacy duplicate cancel sell name transactions.
These were caused by a bug in the name rebuilding code, which has since been fixed. Affected transactions: CancelSellNameTransaction:74 - Error during transaction validation, tx 3FLFa9LuYS3tJ3bHB6mTDnLcAHBbcNHhQhvPT8wvcW14w59TGiJ9NabGe7HzG7XVZRpuhRQoaFDfDfJPcdrU44ry: NAME_NOT_FOR_SALE - 1177021 - 1676828446023 CancelSellNameTransaction:74 - Error during transaction validation, tx 4ZVREx4ZnBn5nfFCXvpjCXLFDV9aSqYcCqhCuYJQ2bf4h4mH6wkuAKGGgF9d2xWZWYY5ujFR2E2PBkg2zTzRhf6m: NAME_NOT_FOR_SALE - 1178222 - 1676841112553 CancelSellNameTransaction:74 - Error during transaction validation, tx 3caxAKM291kUVLmsAfpbsnrgwk9VZdTRLyt86iVjsFzhJs22gGdKf26fJqpzBt6czqhoTosPH9z4o14nQ56cZpjM: NAME_NOT_FOR_SALE - 1179201 - 1676986362069 CancelSellNameTransaction:74 - Error during transaction validation, tx 3FLFa9LuYS3tJ3bHB6mTDnLcAHBbcNHhQhvPT8wvcW14w59TGiJ9NabGe7HzG7XVZRpuhRQoaFDfDfJPcdrU44ry: NAME_NOT_FOR_SALE - 1177021 - 1676828446023 CancelSellNameTransaction:74 - Error during transaction validation, tx 4ZVREx4ZnBn5nfFCXvpjCXLFDV9aSqYcCqhCuYJQ2bf4h4mH6wkuAKGGgF9d2xWZWYY5ujFR2E2PBkg2zTzRhf6m: NAME_NOT_FOR_SALE - 1178222 - 1676841112553 CancelSellNameTransaction:74 - Error during transaction validation, tx 3caxAKM291kUVLmsAfpbsnrgwk9VZdTRLyt86iVjsFzhJs22gGdKf26fJqpzBt6czqhoTosPH9z4o14nQ56cZpjM: NAME_NOT_FOR_SALE - 1179201 - 1676986362069
This commit is contained in:
parent
5b1f05d1d9
commit
f808e80045
@ -79,7 +79,8 @@ public class BlockChain {
|
|||||||
selfSponsorshipAlgoV1Height,
|
selfSponsorshipAlgoV1Height,
|
||||||
feeValidationFixTimestamp,
|
feeValidationFixTimestamp,
|
||||||
chatReferenceTimestamp,
|
chatReferenceTimestamp,
|
||||||
arbitraryOptionalFeeTimestamp;
|
arbitraryOptionalFeeTimestamp,
|
||||||
|
cancelSellNameValidationTimestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Custom transaction fees
|
// Custom transaction fees
|
||||||
@ -527,6 +528,10 @@ public class BlockChain {
|
|||||||
return this.featureTriggers.get(FeatureTrigger.arbitraryOptionalFeeTimestamp.name()).longValue();
|
return this.featureTriggers.get(FeatureTrigger.arbitraryOptionalFeeTimestamp.name()).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getCancelSellNameValidationTimestamp() {
|
||||||
|
return this.featureTriggers.get(FeatureTrigger.cancelSellNameValidationTimestamp.name()).longValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// More complex getters for aspects that change by height or timestamp
|
// More complex getters for aspects that change by height or timestamp
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.qortal.account.Account;
|
import org.qortal.account.Account;
|
||||||
import org.qortal.asset.Asset;
|
import org.qortal.asset.Asset;
|
||||||
|
import org.qortal.block.BlockChain;
|
||||||
import org.qortal.controller.repository.NamesDatabaseIntegrityCheck;
|
import org.qortal.controller.repository.NamesDatabaseIntegrityCheck;
|
||||||
import org.qortal.data.naming.NameData;
|
import org.qortal.data.naming.NameData;
|
||||||
import org.qortal.data.transaction.CancelSellNameTransactionData;
|
import org.qortal.data.transaction.CancelSellNameTransactionData;
|
||||||
@ -65,7 +66,9 @@ public class CancelSellNameTransaction extends Transaction {
|
|||||||
|
|
||||||
// Check name is currently for sale
|
// Check name is currently for sale
|
||||||
if (!nameData.isForSale())
|
if (!nameData.isForSale())
|
||||||
return ValidationResult.NAME_NOT_FOR_SALE;
|
// Only validate after feature-trigger timestamp, due to a small number of double cancelations in the chain history
|
||||||
|
if (this.cancelSellNameTransactionData.getTimestamp() > BlockChain.getInstance().getCancelSellNameValidationTimestamp())
|
||||||
|
return ValidationResult.NAME_NOT_FOR_SALE;
|
||||||
|
|
||||||
// Check transaction creator matches name's current owner
|
// Check transaction creator matches name's current owner
|
||||||
Account owner = getOwner();
|
Account owner = getOwner();
|
||||||
|
@ -86,7 +86,8 @@
|
|||||||
"selfSponsorshipAlgoV1Height": 1092400,
|
"selfSponsorshipAlgoV1Height": 1092400,
|
||||||
"feeValidationFixTimestamp": 1671918000000,
|
"feeValidationFixTimestamp": 1671918000000,
|
||||||
"chatReferenceTimestamp": 1674316800000,
|
"chatReferenceTimestamp": 1674316800000,
|
||||||
"arbitraryOptionalFeeTimestamp": 1680278400000
|
"arbitraryOptionalFeeTimestamp": 1680278400000,
|
||||||
|
"cancelSellNameValidationTimestamp": 1676986362069
|
||||||
},
|
},
|
||||||
"checkpoints": [
|
"checkpoints": [
|
||||||
{ "height": 1136300, "signature": "3BbwawEF2uN8Ni5ofpJXkukoU8ctAPxYoFB7whq9pKfBnjfZcpfEJT4R95NvBDoTP8WDyWvsUvbfHbcr9qSZuYpSKZjUQTvdFf6eqznHGEwhZApWfvXu6zjGCxYCp65F4jsVYYJjkzbjmkCg5WAwN5voudngA23kMK6PpTNygapCzXt" }
|
{ "height": 1136300, "signature": "3BbwawEF2uN8Ni5ofpJXkukoU8ctAPxYoFB7whq9pKfBnjfZcpfEJT4R95NvBDoTP8WDyWvsUvbfHbcr9qSZuYpSKZjUQTvdFf6eqznHGEwhZApWfvXu6zjGCxYCp65F4jsVYYJjkzbjmkCg5WAwN5voudngA23kMK6PpTNygapCzXt" }
|
||||||
|
Loading…
Reference in New Issue
Block a user