mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 03:47:57 +00:00
Companion for 8166 (Update storage_kill return value) (#2488)
* New return value * update kill outcome * Update name * "Update Substrate" Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+139
-139
File diff suppressed because it is too large
Load Diff
@@ -286,7 +286,7 @@ impl sp_externalities::Externalities for ValidationExternalities {
|
||||
panic!("child_storage: unsupported feature for parachain validation")
|
||||
}
|
||||
|
||||
fn kill_child_storage(&mut self, _: &ChildInfo, _: Option<u32>) -> bool {
|
||||
fn kill_child_storage(&mut self, _: &ChildInfo, _: Option<u32>) -> (bool, u32) {
|
||||
panic!("kill_child_storage: unsupported feature for parachain validation")
|
||||
}
|
||||
|
||||
|
||||
@@ -486,7 +486,8 @@ decl_module! {
|
||||
|
||||
// Try killing the crowdloan child trie
|
||||
match Self::crowdloan_kill(index) {
|
||||
child::KillOutcome::AllRemoved => {
|
||||
// TODO use this value for refund
|
||||
child::KillChildStorageResult::AllRemoved(_) => {
|
||||
let account = Self::fund_account_id(index);
|
||||
T::Currency::transfer(&account, &fund.owner, fund.deposit, AllowDeath)?;
|
||||
|
||||
@@ -498,7 +499,8 @@ decl_module! {
|
||||
|
||||
Self::deposit_event(RawEvent::Dissolved(index));
|
||||
},
|
||||
child::KillOutcome::SomeRemaining => {
|
||||
// TODO use this value for refund
|
||||
child::KillChildStorageResult::SomeRemaining(_) => {
|
||||
Self::deposit_event(RawEvent::PartiallyDissolved(index));
|
||||
}
|
||||
}
|
||||
@@ -569,7 +571,7 @@ impl<T: Config> Module<T> {
|
||||
who.using_encoded(|b| child::kill(&Self::id_from_index(index), b));
|
||||
}
|
||||
|
||||
pub fn crowdloan_kill(index: FundIndex) -> child::KillOutcome {
|
||||
pub fn crowdloan_kill(index: FundIndex) -> child::KillChildStorageResult {
|
||||
child::kill_storage(&Self::id_from_index(index), Some(T::RemoveKeysLimit::get()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user