Skip to content

Commit

Permalink
Migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Aug 9, 2024
1 parent 645d04c commit 6b4dd10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions runtime/crab/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
}

fn migrate() -> frame_support::weights::Weight {
frame_support::weights::Weight::zero()
// <Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, 0)
darwinia_staking::migration::migrate_staking_reward_distribution_contract::<Runtime>();

// frame_support::weights::Weight::zero()
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(10, 10)
}
4 changes: 3 additions & 1 deletion runtime/darwinia/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ fn migrate() -> frame_support::weights::Weight {
}
.remove_storage_values();

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

// frame_support::weights::Weight::zero()
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, n)
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(10, n + 10)
}

0 comments on commit 6b4dd10

Please sign in to comment.