Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions template/node/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,19 @@ pub fn create_benchmark_extrinsic(
.checked_next_power_of_two()
.map(|c| c / 2)
.unwrap_or(2) as u64;
let extra: runtime::SignedExtra = (
let extra: runtime::SignedExtra = cumulus_pallet_weight_reclaim::StorageWeightReclaim::<
runtime::Runtime,
(
frame_system::CheckNonZeroSender<runtime::Runtime>,
frame_system::CheckSpecVersion<runtime::Runtime>,
frame_system::CheckTxVersion<runtime::Runtime>,
frame_system::CheckGenesis<runtime::Runtime>,
frame_system::CheckMortality<runtime::Runtime>,
frame_system::CheckNonce<runtime::Runtime>,
frame_system::CheckWeight<runtime::Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<runtime::Runtime>,
),
>::new((
Comment thread
dimartiro marked this conversation as resolved.
Outdated
frame_system::CheckNonZeroSender::<runtime::Runtime>::new(),
frame_system::CheckSpecVersion::<runtime::Runtime>::new(),
frame_system::CheckTxVersion::<runtime::Runtime>::new(),
Expand All @@ -133,8 +145,7 @@ pub fn create_benchmark_extrinsic(
frame_system::CheckNonce::<runtime::Runtime>::from(nonce),
frame_system::CheckWeight::<runtime::Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
cumulus_pallet_weight_reclaim::StorageWeightReclaim::<runtime::Runtime, ()>::new(()),
);
));

let raw_payload = runtime::SignedPayload::from_raw(
call.clone(),
Expand All @@ -148,7 +159,6 @@ pub fn create_benchmark_extrinsic(
(),
(),
(),
(),
),
);
let signature = raw_payload.using_encoded(|e| sender.sign(e));
Expand Down
24 changes: 13 additions & 11 deletions template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,19 @@ pub type SignedBlock = generic::SignedBlock<Block>;
pub type BlockId = generic::BlockId<Block>;

/// The SignedExtension to the basic transaction logic.
pub type SignedExtra = (
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
cumulus_pallet_weight_reclaim::StorageWeightReclaim<Runtime, ()>,
);
pub type SignedExtra = cumulus_pallet_weight_reclaim::StorageWeightReclaim<
Runtime,
(
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
),
>;

/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down
Loading