Compatibility with whisper v6 (#6179)
* compatibility with whisper v6 * separate subprotocol for parity extensions * kill version field
This commit is contained in:
committed by
Gav Wood
parent
246b5282e5
commit
375668bc40
@@ -497,6 +497,8 @@ pub trait ManageNetwork : Send + Sync {
|
||||
fn stop_network(&self);
|
||||
/// Query the current configuration of the network
|
||||
fn network_config(&self) -> NetworkConfiguration;
|
||||
/// Get network context for protocol.
|
||||
fn with_proto_context(&self, proto: ProtocolId, f: &mut FnMut(&NetworkContext));
|
||||
}
|
||||
|
||||
|
||||
@@ -538,6 +540,10 @@ impl ManageNetwork for EthSync {
|
||||
fn network_config(&self) -> NetworkConfiguration {
|
||||
NetworkConfiguration::from(self.network.config().clone())
|
||||
}
|
||||
|
||||
fn with_proto_context(&self, proto: ProtocolId, f: &mut FnMut(&NetworkContext)) {
|
||||
self.network.with_context_eval(proto, f);
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
@@ -808,6 +814,10 @@ impl ManageNetwork for LightSync {
|
||||
fn network_config(&self) -> NetworkConfiguration {
|
||||
NetworkConfiguration::from(self.network.config().clone())
|
||||
}
|
||||
|
||||
fn with_proto_context(&self, proto: ProtocolId, f: &mut FnMut(&NetworkContext)) {
|
||||
self.network.with_context_eval(proto, f);
|
||||
}
|
||||
}
|
||||
|
||||
impl LightSyncProvider for LightSync {
|
||||
|
||||
Reference in New Issue
Block a user