mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Benchmarks for message delivery transaction (#567)
* benchmarks for pallet_message_lane::receive_messages_proof * use CallOrigin::TargetAccount (worst case of CallOrigin) * fmt * closures * Update modules/message-lane/src/benchmarking.rs Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com> * Update modules/message-lane/src/benchmarking.rs Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com> * fix compilation Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
f26775d690
commit
6317a31e25
@@ -370,6 +370,18 @@ fn ensure_operational<T: Config>() -> Result<(), Error<T>> {
|
||||
}
|
||||
}
|
||||
|
||||
/// (Re)initialize bridge with given header for using it in external benchmarks.
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub fn initialize_for_benchmarks<T: Config>(header: HeaderOf<T::BridgedChain>) {
|
||||
initialize_bridge::<T>(InitializationData {
|
||||
header,
|
||||
authority_list: Vec::new(), // we don't verify any proofs in external benchmarks
|
||||
set_id: 0,
|
||||
scheduled_change: None,
|
||||
is_halted: false,
|
||||
});
|
||||
}
|
||||
|
||||
/// Since this writes to storage with no real checks this should only be used in functions that were
|
||||
/// called by a trusted origin.
|
||||
fn initialize_bridge<T: Config>(init_params: InitializationData<BridgedHeader<T>>) {
|
||||
|
||||
Reference in New Issue
Block a user