From 749aa9919f3c230448477480a8697cf03f7b8e87 Mon Sep 17 00:00:00 2001 From: Arthur Diego Date: Fri, 28 Aug 2026 14:27:20 +0000 Subject: [PATCH] fix(limit-orders): retain linked outputs for 180 days --- runtime/src/lib.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index e5f3745dd3..f62766d3b9 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -235,7 +235,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 450, + spec_version: 451, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -1330,8 +1330,8 @@ impl pallet_crowdloan::Config for Runtime { parameter_types! { pub const LimitOrdersPalletId: PalletId = PalletId(*b"bt/limit"); pub const LimitOrdersMaxOrdersPerBatch: u32 = 100; - /// Provider records stay drawable for 7 days. - pub const LimitOrdersLinkedOutputTtl: u64 = 7 * 24 * 60 * 60 * 1000; + /// Provider records stay drawable for the 180-day advanced-order GTC lifetime. + pub const LimitOrdersLinkedOutputTtl: u64 = 180 * 24 * 60 * 60 * 1000; } pub struct LimitOrdersPalletHotkey; @@ -2695,3 +2695,8 @@ fn test_into_evm_balance_overflow() { let result = SubtensorEvmBalanceConverter::into_evm_balance(substrate_balance); assert_eq!(result, Some(expected_evm_balance)); // Should return the scaled value } + +#[test] +fn linked_output_ttl_covers_advanced_order_gtc_lifetime() { + assert_eq!(LimitOrdersLinkedOutputTtl::get(), 180 * 24 * 60 * 60 * 1000); +}