mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 05:05:41 +00:00
network-bridge: remove action_sink abstraction (#3308)
* network-bridge: remove action_sink abstraction * another wtf * filter out event stream * Revert "filter out event stream" This reverts commit 63bd8f5de5b44d415dcb205e1b9fad8145200e06. * retain cleanup though
This commit is contained in:
@@ -143,10 +143,10 @@ impl<N: Network, AD: AuthorityDiscovery> Service<N, AD> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::network::{Network, NetworkAction};
|
||||
use crate::network::Network;
|
||||
|
||||
use std::{borrow::Cow, pin::Pin, collections::HashMap};
|
||||
use futures::{sink::Sink, stream::BoxStream};
|
||||
use std::{borrow::Cow, collections::HashMap};
|
||||
use futures::stream::BoxStream;
|
||||
use sc_network::{Event as NetworkEvent, IfDisconnected};
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
use polkadot_node_network_protocol::request_response::request::Requests;
|
||||
@@ -203,13 +203,24 @@ mod tests {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn action_sink<'a>(&'a mut self)
|
||||
-> Pin<Box<dyn Sink<NetworkAction, Error = polkadot_subsystem::SubsystemError> + Send + 'a>>
|
||||
{
|
||||
async fn start_request<AD: AuthorityDiscovery>(&self, _: &mut AD, _: Requests, _: IfDisconnected) {
|
||||
}
|
||||
|
||||
fn report_peer(&self, _: PeerId, _: crate::Rep) {
|
||||
panic!()
|
||||
}
|
||||
|
||||
async fn start_request<AD: AuthorityDiscovery>(&self, _: &mut AD, _: Requests, _: IfDisconnected) {
|
||||
fn disconnect_peer(&self, _: PeerId, _: PeerSet) {
|
||||
panic!()
|
||||
}
|
||||
|
||||
fn write_notification(
|
||||
&self,
|
||||
_: PeerId,
|
||||
_: PeerSet,
|
||||
_: Vec<u8>,
|
||||
) {
|
||||
panic!()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user