Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
cargo fmt and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
acatangiu committed Sep 23, 2022
1 parent 683ddc5 commit 200cdf0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion client/beefy/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ use jsonrpsee::{
};
use log::warn;

use beefy_gadget::communication::notification::{BeefyBestBlockStream, BeefyVersionedFinalityProofStream};
use beefy_gadget::communication::notification::{
BeefyBestBlockStream, BeefyVersionedFinalityProofStream,
};

mod notification;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ where
.client
.justifications(&BlockId::Number(request.payload.begin))
.map_err(Error::Client)?
.map(|justifs| justifs.get(BEEFY_ENGINE_ID).cloned())
.flatten()
.and_then(|justifs| justifs.get(BEEFY_ENGINE_ID).cloned())
// No BEEFY justification present.
.ok_or(());

Expand Down
9 changes: 5 additions & 4 deletions client/network/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ use sc_consensus::{
pub use sc_network::config::EmptyTransactionPool;
use sc_network::{
config::{
NetworkConfiguration, NonDefaultSetConfig, NonReservedPeerMode, Role, SyncMode,
TransportConfig,
NetworkConfiguration, NonDefaultSetConfig, NonReservedPeerMode, RequestResponseConfig,
Role, SyncMode, TransportConfig,
},
Multiaddr, NetworkService, NetworkWorker,
};
use sc_network::config::RequestResponseConfig;
use sc_network_common::{
config::{MultiaddrWithPeerId, ProtocolId},
protocol::ProtocolName,
Expand Down Expand Up @@ -795,7 +794,9 @@ where
network_config.transport = TransportConfig::MemoryOnly;
network_config.listen_addresses = vec![listen_addr.clone()];
network_config.allow_non_globals_in_dht = true;
network_config.request_response_protocols.extend(config.request_response_protocols);
network_config
.request_response_protocols
.extend(config.request_response_protocols);
network_config.extra_sets = config
.notifications_protocols
.into_iter()
Expand Down

0 comments on commit 200cdf0

Please sign in to comment.