Skip to content

Commit

Permalink
Remove old migration
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Lau <x@acg.box>
  • Loading branch information
aurexav committed Dec 2, 2024
1 parent ac3f0a3 commit 4bdbf50
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions runtime/crab/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
fn post_upgrade(_state: Vec<u8>) -> Result<(), sp_runtime::DispatchError> {
log::info!("post");

darwinia_staking::migration::post_check::<Runtime>();

Ok(())
}

Expand All @@ -47,16 +45,11 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
}

fn migrate() -> frame_support::weights::Weight {
if let Ok(k) = array_bytes::hex2bytes("0x1da53b775b270400e7e61ed5cbc5a146ab1160471b1418779239ba8e2b847e42d53de13b56da115d3342f0588bc3614108837de0ae21c270383d9f2de4db03c7b1314632314d8c74970d627c9b4f4c42e06688a9f7a2866905a810c4b1a49b8cb0dca3f1bc953905609869b6e9d4fb794cd36c5f") {
let _ = System::kill_storage(RuntimeOrigin::root(), vec![k]);
}

let (r, w) = darwinia_staking::migration::migrate::<Runtime>();
let _ = Balances::transfer_all(
RuntimeOrigin::signed(PalletId(*b"dar/depo").into_account_truncating()),
Treasury::account_id(),
false,
);

<Runtime as frame_system::Config>::DbWeight::get().reads_writes(r, w + 6)
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, 6)
}

0 comments on commit 4bdbf50

Please sign in to comment.