mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Remove blocking sync -> import-queue operations (#1818)
* remove blocking sync -> import-queue operations add specialization to testnet remove add peer default impl on TestNetFactory * remove empty brackets from dummy specialization * nits * make mut_peers take an fn once * add SpecializationFactory trait in test * remove add_peer imple in grandpa, fix typo * use cmp::max for best importing number comparison * remove import of non-existent create_peer * add sender to start message
This commit is contained in:
committed by
Bastian Köcher
parent
04fed82940
commit
8a72abffdd
@@ -699,11 +699,12 @@ mod tests {
|
||||
const TEST_ROUTING_INTERVAL: Duration = Duration::from_millis(50);
|
||||
|
||||
pub struct AuraTestNet {
|
||||
peers: Vec<Arc<Peer<()>>>,
|
||||
peers: Vec<Arc<Peer<(), DummySpecialization>>>,
|
||||
started: bool,
|
||||
}
|
||||
|
||||
impl TestNetFactory for AuraTestNet {
|
||||
type Specialization = DummySpecialization;
|
||||
type Verifier = AuraVerifier<PeersClient, NothingExtra>;
|
||||
type PeerData = ();
|
||||
|
||||
@@ -734,15 +735,15 @@ mod tests {
|
||||
})
|
||||
}
|
||||
|
||||
fn peer(&self, i: usize) -> &Peer<Self::PeerData> {
|
||||
fn peer(&self, i: usize) -> &Peer<Self::PeerData, DummySpecialization> {
|
||||
&self.peers[i]
|
||||
}
|
||||
|
||||
fn peers(&self) -> &Vec<Arc<Peer<Self::PeerData>>> {
|
||||
fn peers(&self) -> &Vec<Arc<Peer<Self::PeerData, DummySpecialization>>> {
|
||||
&self.peers
|
||||
}
|
||||
|
||||
fn mut_peers<F: Fn(&mut Vec<Arc<Peer<Self::PeerData>>>)>(&mut self, closure: F) {
|
||||
fn mut_peers<F: FnOnce(&mut Vec<Arc<Peer<Self::PeerData, DummySpecialization>>>)>(&mut self, closure: F) {
|
||||
closure(&mut self.peers);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user