Skip to content

Commit 437dd7d

Browse files
committed
Account for root claim dispatch extension weight
1 parent e02fb27 commit 437dd7d

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎runtime/tests/claim_root_weight.rs‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,14 @@ fn new_test_ext() -> sp_io::TestExternalities {
2222
fn expected_root_claim_weight(limit: u32) -> frame_support::weights::Weight {
2323
use pallet_subtensor::weights::WeightInfo;
2424

25-
pallet_subtensor::weights::SubstrateWeight::<Runtime>::claim_root(limit).saturating_add(
26-
pallet_subtensor::weights::SubstrateWeight::<Runtime>::claim_root_scan(limit),
27-
)
25+
pallet_subtensor::weights::SubstrateWeight::<Runtime>::claim_root(limit)
26+
.saturating_add(
27+
pallet_subtensor::weights::SubstrateWeight::<Runtime>::claim_root_scan(limit),
28+
)
29+
// FRAME folds the runtime's dispatch-extension weight into `call_weight`.
30+
.saturating_add(
31+
pallet_subtensor::weights::SubstrateWeight::<Runtime>::check_coldkey_swap_extension(),
32+
)
2833
}
2934

3035
fn assert_call_fits_normal_limit(call: RuntimeCall) {

0 commit comments

Comments
 (0)