mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 15:07:59 +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:
@@ -72,11 +72,7 @@ impl<B: BlockT> GossipEngine<B> {
|
||||
validator: Arc<dyn Validator<B>>,
|
||||
) -> Self where B: 'static {
|
||||
let protocol = protocol.into();
|
||||
|
||||
// We grab the event stream before registering the notifications protocol, otherwise we
|
||||
// might miss events.
|
||||
let network_event_stream = network.event_stream();
|
||||
network.register_notifications_protocol(protocol.clone());
|
||||
|
||||
GossipEngine {
|
||||
state_machine: ConsensusGossip::new(validator, protocol.clone()),
|
||||
@@ -335,8 +331,6 @@ mod tests {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
fn register_notifications_protocol(&self, _: Cow<'static, str>) {}
|
||||
|
||||
fn announce(&self, _: B::Hash, _: Vec<u8>) {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user