mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 06:21:02 +00:00
Remove test dependecies on specific relay clients (#2898)
This commit is contained in:
committed by
Bastian Köcher
parent
4aa9594dd3
commit
f6e48f654b
@@ -21,7 +21,8 @@
|
||||
|
||||
#![cfg(any(feature = "test-helpers", test))]
|
||||
|
||||
use crate::{Chain, ChainWithBalances};
|
||||
use crate::{Chain, ChainWithBalances, ChainWithMessages};
|
||||
use bp_messages::{ChainWithMessages as ChainWithMessagesBase, MessageNonce};
|
||||
use bp_runtime::ChainId;
|
||||
use frame_support::weights::Weight;
|
||||
use std::time::Duration;
|
||||
@@ -44,7 +45,7 @@ impl bp_runtime::Chain for TestChain {
|
||||
type Signature = sp_runtime::testing::TestSignature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
unreachable!()
|
||||
100000
|
||||
}
|
||||
|
||||
fn max_extrinsic_weight() -> Weight {
|
||||
@@ -69,6 +70,18 @@ impl ChainWithBalances for TestChain {
|
||||
}
|
||||
}
|
||||
|
||||
impl ChainWithMessagesBase for TestChain {
|
||||
const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = "Test";
|
||||
const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = 0;
|
||||
const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 0;
|
||||
}
|
||||
|
||||
impl ChainWithMessages for TestChain {
|
||||
const WITH_CHAIN_RELAYERS_PALLET_NAME: Option<&'static str> = None;
|
||||
const TO_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = "TestMessagesDetailsMethod";
|
||||
const FROM_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = "TestFromMessagesDetailsMethod";
|
||||
}
|
||||
|
||||
/// Primitives-level parachain that may be used in tests.
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct TestParachainBase;
|
||||
|
||||
Reference in New Issue
Block a user