mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 20:31:13 +00:00
fix and test default instance for collective (#3135)
This commit is contained in:
@@ -70,7 +70,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
// implementation changes and behavior does not, then leave spec_version as
|
||||
// is and increment impl_version.
|
||||
spec_version: 113,
|
||||
impl_version: 113,
|
||||
impl_version: 114,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ pub enum RawOrigin<AccountId, I> {
|
||||
}
|
||||
|
||||
/// Origin for the collective module.
|
||||
pub type Origin<T, I> = RawOrigin<<T as system::Trait>::AccountId, I>;
|
||||
pub type Origin<T, I=DefaultInstance> = RawOrigin<<T as system::Trait>::AccountId, I>;
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, Encode, Decode)]
|
||||
#[cfg_attr(feature = "std", derive(Debug))]
|
||||
@@ -97,13 +97,10 @@ decl_storage! {
|
||||
}
|
||||
|
||||
decl_event!(
|
||||
pub enum Event<T, I> where
|
||||
pub enum Event<T, I=DefaultInstance> where
|
||||
<T as system::Trait>::Hash,
|
||||
<T as system::Trait>::AccountId,
|
||||
Phantom = rstd::marker::PhantomData<T>
|
||||
{
|
||||
/// Dummy to manage the fact we have instancing.
|
||||
_Phantom(Phantom),
|
||||
/// A motion (given hash) has been proposed (by given account) with a threshold (given
|
||||
/// `MemberCount`).
|
||||
Proposed(AccountId, ProposalIndex, Hash, MemberCount),
|
||||
@@ -420,6 +417,11 @@ mod tests {
|
||||
type Proposal = Call;
|
||||
type Event = Event;
|
||||
}
|
||||
impl Trait for Test {
|
||||
type Origin = Origin;
|
||||
type Proposal = Call;
|
||||
type Event = Event;
|
||||
}
|
||||
|
||||
pub type Block = primitives::generic::Block<Header, UncheckedExtrinsic>;
|
||||
pub type UncheckedExtrinsic = primitives::generic::UncheckedMortalCompactExtrinsic<u32, u64, Call, ()>;
|
||||
@@ -432,6 +434,7 @@ mod tests {
|
||||
{
|
||||
System: system::{Module, Call, Event},
|
||||
Collective: collective::<Instance1>::{Module, Call, Event<T>, Origin<T>, Config<T>},
|
||||
DefaultCollective: collective::{Module, Call, Event<T>, Origin<T>, Config<T>},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -441,6 +444,7 @@ mod tests {
|
||||
members: vec![1, 2, 3],
|
||||
phantom: Default::default(),
|
||||
}),
|
||||
collective: None,
|
||||
}.build_storage().unwrap().0.into()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user