mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Encryption support for the statement store (#14440)
* Added ECIES encryption * tweaks * fmt * Make clippy happy * Use local keystore * qed
This commit is contained in:
@@ -548,7 +548,7 @@ impl NetworkBehaviour for DiscoveryBehaviour {
|
||||
addresses: &[Multiaddr],
|
||||
effective_role: Endpoint,
|
||||
) -> Result<Vec<Multiaddr>, ConnectionDenied> {
|
||||
let Some(peer_id) = maybe_peer else { return Ok(Vec::new()); };
|
||||
let Some(peer_id) = maybe_peer else { return Ok(Vec::new()) };
|
||||
|
||||
let mut list = self
|
||||
.permanent_addresses
|
||||
|
||||
@@ -658,9 +658,7 @@ impl ProtocolController {
|
||||
/// disconnected, `Ok(false)` if it wasn't found, `Err(PeerId)`, if the peer found, but not in
|
||||
/// connected state.
|
||||
fn drop_reserved_peer(&mut self, peer_id: &PeerId) -> Result<bool, PeerId> {
|
||||
let Some(state) = self.reserved_nodes.get_mut(peer_id) else {
|
||||
return Ok(false)
|
||||
};
|
||||
let Some(state) = self.reserved_nodes.get_mut(peer_id) else { return Ok(false) };
|
||||
|
||||
if let PeerState::Connected(direction) = state {
|
||||
trace!(
|
||||
@@ -678,9 +676,7 @@ impl ProtocolController {
|
||||
/// Try dropping the peer as a regular peer. Return `true` if the peer was found and
|
||||
/// disconnected, `false` if it wasn't found.
|
||||
fn drop_regular_peer(&mut self, peer_id: &PeerId) -> bool {
|
||||
let Some(direction) = self.nodes.remove(peer_id) else {
|
||||
return false
|
||||
};
|
||||
let Some(direction) = self.nodes.remove(peer_id) else { return false };
|
||||
|
||||
trace!(
|
||||
target: LOG_TARGET,
|
||||
|
||||
Reference in New Issue
Block a user