Skip to content

Commit

Permalink
Kill storage key
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Oct 9, 2024
1 parent 9ce33e0 commit c2cc1d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion runtime/crab/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
}

fn migrate() -> frame_support::weights::Weight {
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, 0)
if let Ok(k) = array_bytes::hex2bytes("0x1da53b775b270400e7e61ed5cbc5a146ab1160471b1418779239ba8e2b847e42d53de13b56da115d3342f0588bc3614108837de0ae21c270383d9f2de4db03c7b1314632314d8c74970d627c9b4f4c42e06688a9f7a2866905a810c4b1a49b8cb0dca3f1bc953905609869b6e9d4fb794cd36c5f") {
System::kill_storage(RuntimeOrigin::root(), vec![k]);
}

<Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, 1)
}
6 changes: 5 additions & 1 deletion runtime/darwinia/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,9 @@ fn migrate() -> frame_support::weights::Weight {
log::info!("successfully set KTON staking contract");
}

<Runtime as frame_system::Config>::DbWeight::get().reads_writes(7, 9)
if let Ok(k) = array_bytes::hex2bytes("0x1da53b775b270400e7e61ed5cbc5a146ab1160471b1418779239ba8e2b847e42d53de13b56da115d3342f0588bc3614108837de0ae21c270383d9f2de4db03c7b1314632314d8c74970d627c9b4f4c42e06688a9f7a2866905a810c4b1a49b8cb0dca3f1bc953905609869b6e9d4fb794cd36c5f") {
System::kill_storage(RuntimeOrigin::root(), vec![k]);
}

<Runtime as frame_system::Config>::DbWeight::get().reads_writes(7, 10)
}

0 comments on commit c2cc1d9

Please sign in to comment.