mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
Make communication_for exit when we end a round (#313)
* Make `communication_for` exit when we end a round * Fix compilation
This commit is contained in:
@@ -22,9 +22,7 @@ use parity_codec::{Decode, HasCompact};
|
||||
use srml_support::{decl_storage, decl_module, fail, ensure};
|
||||
|
||||
use bitvec::{bitvec, BigEndian};
|
||||
use sr_primitives::traits::{
|
||||
Hash as HashT, BlakeTwo256, Member, CheckedConversion, Saturating, One, Zero,
|
||||
};
|
||||
use sr_primitives::traits::{Hash as HashT, BlakeTwo256, Member, CheckedConversion, Saturating, One};
|
||||
use primitives::{Hash, Balance, parachain::{
|
||||
self, Id as ParaId, Chain, DutyRoster, AttestedCandidate, Statement, AccountIdConversion,
|
||||
ParachainDispatchOrigin, UpwardMessage, BlockIngressRoots,
|
||||
@@ -243,9 +241,11 @@ decl_storage! {
|
||||
config(parachains): Vec<(ParaId, Vec<u8>, Vec<u8>)>;
|
||||
config(_phdata): PhantomData<T>;
|
||||
build(|storage: &mut StorageOverlay, _: &mut ChildrenStorageOverlay, config: &GenesisConfig<T>| {
|
||||
use sr_primitives::traits::Zero;
|
||||
|
||||
let mut p = config.parachains.clone();
|
||||
p.sort_unstable_by_key(|&(ref id, _, _)| id.clone());
|
||||
p.dedup_by_key(|&mut (ref id, _, _)| id.clone());
|
||||
p.sort_unstable_by_key(|&(ref id, _, _)| *id);
|
||||
p.dedup_by_key(|&mut (ref id, _, _)| *id);
|
||||
|
||||
let only_ids: Vec<_> = p.iter().map(|&(ref id, _, _)| id).cloned().collect();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user