Skip to content

Commit

Permalink
fix: weights
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshvarma committed Oct 4, 2023
1 parent 0fbee3c commit d829013
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/shibuya/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1339,12 +1339,12 @@ pub struct ClearCorruptedUnifiedMappings;
impl OnRuntimeUpgrade for ClearCorruptedUnifiedMappings {
fn on_runtime_upgrade() -> Weight {
let maybe_limit = pallet_unified_accounts::EvmToNative::<Runtime>::iter().count();
let total_w = maybe_limit as u64 * 2;
let total_rw = maybe_limit as u64 * 2;
// remove all items
let _ = pallet_unified_accounts::EvmToNative::<Runtime>::clear(maybe_limit as u32, None);
let _ = pallet_unified_accounts::NativeToEvm::<Runtime>::clear(maybe_limit as u32, None);

<Runtime as frame_system::Config>::DbWeight::get().writes(total_w)
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(total_rw, total_rw)
}
}

Expand Down

0 comments on commit d829013

Please sign in to comment.