Skip to content

Commit 6474efc

Browse files
authored
Merge pull request #2119 from opentensor/fix-utility-weight-mismatch
fix utility::force_batch weight mismatch
2 parents 4a67e16 + 0f2668c commit 6474efc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pallets/subtensor/src/macros/dispatches.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ mod dispatches {
10601060
/// The extrinsic for user to change its hotkey in subnet or all subnets.
10611061
#[pallet::call_index(70)]
10621062
#[pallet::weight((Weight::from_parts(275_300_000, 0)
1063-
.saturating_add(T::DbWeight::get().reads(49_u64))
1063+
.saturating_add(T::DbWeight::get().reads(53_u64))
10641064
.saturating_add(T::DbWeight::get().writes(37)), DispatchClass::Normal, Pays::No))]
10651065
pub fn swap_hotkey(
10661066
origin: OriginFor<T>,
@@ -1134,7 +1134,7 @@ mod dispatches {
11341134
///
11351135
#[pallet::call_index(75)]
11361136
#[pallet::weight((
1137-
Weight::from_parts(45_360_000, 0)
1137+
Weight::from_parts(66_450_000, 0)
11381138
.saturating_add(T::DbWeight::get().reads(5))
11391139
.saturating_add(T::DbWeight::get().writes(2)),
11401140
DispatchClass::Normal,

pallets/utility/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ pub mod pallet {
456456
} else {
457457
Self::deposit_event(Event::BatchCompleted);
458458
}
459-
let base_weight = T::WeightInfo::batch(calls_len as u32);
459+
let base_weight = T::WeightInfo::force_batch(calls_len as u32);
460460
Ok(Some(base_weight.saturating_add(weight)).into())
461461
}
462462

0 commit comments

Comments
 (0)