mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 00:41:03 +00:00
expose test utilities to be used in BH paras (#2142)
Signed-off-by: acatangiu <adrian@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
1e56593bf2
commit
564cc5ead7
@@ -28,12 +28,12 @@ pub mod messages;
|
||||
pub mod messages_api;
|
||||
pub mod messages_benchmarking;
|
||||
pub mod messages_call_ext;
|
||||
pub mod messages_generation;
|
||||
pub mod messages_xcm_extension;
|
||||
pub mod parachains_benchmarking;
|
||||
pub mod priority_calculator;
|
||||
pub mod refund_relayer_extension;
|
||||
|
||||
mod messages_generation;
|
||||
mod mock;
|
||||
|
||||
#[cfg(feature = "integrity-test")]
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
//! Helpers for generating message storage proofs, that are used by tests and by benchmarks.
|
||||
|
||||
#![cfg(any(feature = "runtime-benchmarks", test))]
|
||||
|
||||
use crate::messages::{BridgedChain, HashOf, HasherOf, MessageBridge};
|
||||
|
||||
use bp_messages::{
|
||||
@@ -29,19 +27,19 @@ use sp_std::{ops::RangeInclusive, prelude::*};
|
||||
use sp_trie::{trie_types::TrieDBMutBuilderV1, LayoutV1, MemoryDB, TrieMut};
|
||||
|
||||
/// Simple and correct message data encode function.
|
||||
pub(crate) fn encode_all_messages(_: MessageNonce, m: &MessagePayload) -> Option<Vec<u8>> {
|
||||
pub fn encode_all_messages(_: MessageNonce, m: &MessagePayload) -> Option<Vec<u8>> {
|
||||
Some(m.encode())
|
||||
}
|
||||
|
||||
/// Simple and correct outbound lane data encode function.
|
||||
pub(crate) fn encode_lane_data(d: &OutboundLaneData) -> Vec<u8> {
|
||||
pub fn encode_lane_data(d: &OutboundLaneData) -> Vec<u8> {
|
||||
d.encode()
|
||||
}
|
||||
|
||||
/// Prepare storage proof of given messages.
|
||||
///
|
||||
/// Returns state trie root and nodes with prepared messages.
|
||||
pub(crate) fn prepare_messages_storage_proof<B>(
|
||||
pub fn prepare_messages_storage_proof<B>(
|
||||
lane: LaneId,
|
||||
message_nonces: RangeInclusive<MessageNonce>,
|
||||
outbound_lane_data: Option<OutboundLaneData>,
|
||||
|
||||
Reference in New Issue
Block a user