mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
Alliance pallet: split force_set_members call (#12179)
* Alliance pallet: split force_set_members call * use counts for event * ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance Co-authored-by: command-bot <>
This commit is contained in:
@@ -197,14 +197,6 @@ impl ProposalProvider<u64, H256, Call> for AllianceProposalProvider {
|
||||
fn proposal_of(proposal_hash: H256) -> Option<Call> {
|
||||
AllianceMotion::proposal_of(proposal_hash)
|
||||
}
|
||||
|
||||
fn proposals() -> Vec<H256> {
|
||||
AllianceMotion::proposals().into_inner()
|
||||
}
|
||||
|
||||
fn proposals_count() -> u32 {
|
||||
pallet_collective::Proposals::<Test, AllianceCollective>::decode_len().unwrap_or(0) as u32
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -326,13 +318,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
Error::<Test, ()>::AllianceNotYetInitialized
|
||||
);
|
||||
|
||||
assert_ok!(Alliance::force_set_members(
|
||||
Origin::root(),
|
||||
vec![1, 2],
|
||||
vec![3],
|
||||
vec![],
|
||||
Default::default()
|
||||
));
|
||||
assert_ok!(Alliance::init_members(Origin::root(), vec![1, 2], vec![3], vec![]));
|
||||
|
||||
System::set_block_number(1);
|
||||
});
|
||||
@@ -369,8 +355,3 @@ pub fn make_proposal(proposal: Call) -> (Call, u32, H256) {
|
||||
let hash = BlakeTwo256::hash_of(&proposal);
|
||||
(proposal, len, hash)
|
||||
}
|
||||
|
||||
pub fn assert_prev_event(event: Event) {
|
||||
let events = System::events();
|
||||
assert_eq!(events.get(events.len() - 2).expect("events expected").event, event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user