Skip to content

Commit 7a26f8e

Browse files
committed
Fix StorageWeightReclaim usage
1 parent b146521 commit 7a26f8e

File tree

2 files changed

+26
-13
lines changed

2 files changed

+26
-13
lines changed

template/node/src/benchmarking.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,19 @@ 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 = (
124+
let extra: runtime::SignedExtra = cumulus_pallet_weight_reclaim::StorageWeightReclaim::<
125+
runtime::Runtime,
126+
(
127+
frame_system::CheckNonZeroSender<runtime::Runtime>,
128+
frame_system::CheckSpecVersion<runtime::Runtime>,
129+
frame_system::CheckTxVersion<runtime::Runtime>,
130+
frame_system::CheckGenesis<runtime::Runtime>,
131+
frame_system::CheckMortality<runtime::Runtime>,
132+
frame_system::CheckNonce<runtime::Runtime>,
133+
frame_system::CheckWeight<runtime::Runtime>,
134+
pallet_transaction_payment::ChargeTransactionPayment<runtime::Runtime>,
135+
),
136+
>::new(
125137
frame_system::CheckNonZeroSender::<runtime::Runtime>::new(),
126138
frame_system::CheckSpecVersion::<runtime::Runtime>::new(),
127139
frame_system::CheckTxVersion::<runtime::Runtime>::new(),
@@ -133,7 +145,6 @@ pub fn create_benchmark_extrinsic(
133145
frame_system::CheckNonce::<runtime::Runtime>::from(nonce),
134146
frame_system::CheckWeight::<runtime::Runtime>::new(),
135147
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
136-
cumulus_pallet_weight_reclaim::StorageWeightReclaim::<runtime::Runtime, ()>::new(()),
137148
);
138149

139150
let raw_payload = runtime::SignedPayload::from_raw(

template/runtime/src/lib.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,19 @@ 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 = (
113-
frame_system::CheckNonZeroSender<Runtime>,
114-
frame_system::CheckSpecVersion<Runtime>,
115-
frame_system::CheckTxVersion<Runtime>,
116-
frame_system::CheckGenesis<Runtime>,
117-
frame_system::CheckEra<Runtime>,
118-
frame_system::CheckNonce<Runtime>,
119-
frame_system::CheckWeight<Runtime>,
120-
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
121-
cumulus_pallet_weight_reclaim::StorageWeightReclaim<Runtime, ()>,
122-
);
112+
pub type SignedExtra = cumulus_pallet_weight_reclaim::StorageWeightReclaim<
113+
Runtime,
114+
(
115+
frame_system::CheckNonZeroSender<Runtime>,
116+
frame_system::CheckSpecVersion<Runtime>,
117+
frame_system::CheckTxVersion<Runtime>,
118+
frame_system::CheckGenesis<Runtime>,
119+
frame_system::CheckEra<Runtime>,
120+
frame_system::CheckNonce<Runtime>,
121+
frame_system::CheckWeight<Runtime>,
122+
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
123+
),
124+
>;
123125

124126
/// Unchecked extrinsic type as expected by this runtime.
125127
pub type UncheckedExtrinsic =

0 commit comments

Comments
 (0)