diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b989e6b71..c57fa0ef99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Feature for enabling debug prints in the Polkadot and Kusama runtime ([polkadot-fellows/runtimes#85](https://github.com/polkadot-fellows/runtimes/pull/85)) - Added new "Wish for Change" track ([polkadot-fellows/runtimes#184](https://github.com/polkadot-fellows/runtimes/pull/184)) - Enable Coretime and on-demand on Kusama ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159)) +- Refund any leases that are not migrated to Coretime (have holes in them/have not yet started) ([polkadot-fellows/runtimes#206](https://github.com/polkadot-fellows/runtimes/pull/206)) - Enable Elastic Scaling node side feature for Kusama ([polkadot-fellows/runtimes#205](https://github.com/polkadot-fellows/runtimes/pull/205)) - Cancel Parachain Auctions ([polkadot-fellows/runtimes#215](https://github.com/polkadot-fellows/runtimes/pull/215)) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 6c9f821d80..e8e1a0b0a0 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1764,8 +1764,19 @@ pub mod migrations { if lease.is_empty() { return None } - // Lease not yet started, ignore: + // Lease not yet started/or having holes, refund (coretime can't handle this): if lease.iter().any(Option::is_none) { + if let Err(err) = slots::Pallet::::clear_all_leases( + frame_system::RawOrigin::Root.into(), + para, + ) { + log::error!( + target: "runtime", + "Clearing lease for para: {:?} failed, with error: {:?}", + para, + err + ); + }; return None } let (index, _) =