Skip to content

Commit 522716e

Browse files
committed
Fix StorageWeightReclaim usage
1 parent b146521 commit 522716e

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

template/node/src/benchmarking.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,20 @@ pub fn create_benchmark_extrinsic(
121121
.checked_next_power_of_two()
122122
.map(|c| c / 2)
123123
.unwrap_or(2) as u64;
124-
let extra: runtime::SignedExtra = (
125-
frame_system::CheckNonZeroSender::<runtime::Runtime>::new(),
126-
frame_system::CheckSpecVersion::<runtime::Runtime>::new(),
127-
frame_system::CheckTxVersion::<runtime::Runtime>::new(),
128-
frame_system::CheckGenesis::<runtime::Runtime>::new(),
129-
frame_system::CheckMortality::<runtime::Runtime>::from(Era::mortal(
130-
period,
131-
best_block.saturated_into(),
132-
)),
133-
frame_system::CheckNonce::<runtime::Runtime>::from(nonce),
134-
frame_system::CheckWeight::<runtime::Runtime>::new(),
135-
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
136-
cumulus_pallet_weight_reclaim::StorageWeightReclaim::<runtime::Runtime, ()>::new(()),
137-
);
124+
let extra: runtime::SignedExtra =
125+
cumulus_pallet_weight_reclaim::StorageWeightReclaim::<runtime::Runtime, ()>::new(
126+
frame_system::CheckNonZeroSender::<runtime::Runtime>::new(),
127+
frame_system::CheckSpecVersion::<runtime::Runtime>::new(),
128+
frame_system::CheckTxVersion::<runtime::Runtime>::new(),
129+
frame_system::CheckGenesis::<runtime::Runtime>::new(),
130+
frame_system::CheckMortality::<runtime::Runtime>::from(Era::mortal(
131+
period,
132+
best_block.saturated_into(),
133+
)),
134+
frame_system::CheckNonce::<runtime::Runtime>::from(nonce),
135+
frame_system::CheckWeight::<runtime::Runtime>::new(),
136+
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
137+
);
138138

139139
let raw_payload = runtime::SignedPayload::from_raw(
140140
call.clone(),

template/runtime/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub type SignedBlock = generic::SignedBlock<Block>;
109109
pub type BlockId = generic::BlockId<Block>;
110110

111111
/// The SignedExtension to the basic transaction logic.
112-
pub type SignedExtra = (
112+
pub type SignedExtra = cumulus_pallet_weight_reclaim::StorageWeightReclaim<Runtime,(
113113
frame_system::CheckNonZeroSender<Runtime>,
114114
frame_system::CheckSpecVersion<Runtime>,
115115
frame_system::CheckTxVersion<Runtime>,
@@ -118,7 +118,6 @@ pub type SignedExtra = (
118118
frame_system::CheckNonce<Runtime>,
119119
frame_system::CheckWeight<Runtime>,
120120
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
121-
cumulus_pallet_weight_reclaim::StorageWeightReclaim<Runtime, ()>,
122121
);
123122

124123
/// Unchecked extrinsic type as expected by this runtime.

0 commit comments

Comments
 (0)