mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 15:37:56 +00:00
Remove sc_network::NetworkService::register_notifications_protocol and partially refactor Grandpa tests (#7646)
* Remove sc_network::NetworkService::register_notifications_protocol * Missing calls to .into() * Wrong crate name * [WIP] Fix Grandpa tests * One more passing * One more. Two to go. * This one was actually already passing 🎉 * Last one compiles * Progress * grandpa: fix voter_persists_its_votes test * Restore other tests * Try spawn future later Co-authored-by: André Silva <andrerfosilva@gmail.com>
This commit is contained in:
@@ -81,14 +81,6 @@ pub trait Network<B: BlockT> {
|
||||
/// Send a notification to a peer.
|
||||
fn write_notification(&self, who: PeerId, protocol: Cow<'static, str>, message: Vec<u8>);
|
||||
|
||||
/// Registers a notifications protocol.
|
||||
///
|
||||
/// See the documentation of [`NetworkService:register_notifications_protocol`] for more information.
|
||||
fn register_notifications_protocol(
|
||||
&self,
|
||||
protocol: Cow<'static, str>,
|
||||
);
|
||||
|
||||
/// Notify everyone we're connected to that we have the given block.
|
||||
///
|
||||
/// Note: this method isn't strictly related to gossiping and should eventually be moved
|
||||
@@ -113,13 +105,6 @@ impl<B: BlockT, H: ExHashT> Network<B> for Arc<NetworkService<B, H>> {
|
||||
NetworkService::write_notification(self, who, protocol, message)
|
||||
}
|
||||
|
||||
fn register_notifications_protocol(
|
||||
&self,
|
||||
protocol: Cow<'static, str>,
|
||||
) {
|
||||
NetworkService::register_notifications_protocol(self, protocol)
|
||||
}
|
||||
|
||||
fn announce(&self, block: B::Hash, associated_data: Vec<u8>) {
|
||||
NetworkService::announce_block(self, block, associated_data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user