Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
grandpa: replace &Option<T> with Option<&T>
  • Loading branch information
andresilva committed Jun 16, 2020
commit 6fb5f6585be696dfc66b7189ab34d7918d16db7d
6 changes: 3 additions & 3 deletions client/finality-grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ fn global_communication<BE, Block: BlockT, C, N>(
voters: &Arc<VoterSet<AuthorityId>>,
client: Arc<C>,
network: &NetworkBridge<Block, N>,
keystore: &Option<BareCryptoStorePtr>,
keystore: Option<&BareCryptoStorePtr>,
metrics: Option<until_imported::Metrics>,
) -> (
impl Stream<
Expand All @@ -609,7 +609,7 @@ fn global_communication<BE, Block: BlockT, C, N>(
N: NetworkT<Block>,
NumberFor<Block>: BlockNumberOps,
{
let is_voter = is_voter(voters, keystore.as_ref()).is_some();
let is_voter = is_voter(voters, keystore).is_some();

// verification stream
let (global_in, global_out) = network.global_communication(
Expand Down Expand Up @@ -907,7 +907,7 @@ where
&self.env.voters,
self.env.client.clone(),
&self.env.network,
&self.env.config.keystore,
self.env.config.keystore.as_ref(),
self.metrics.as_ref().map(|m| m.until_imported.clone()),
);

Expand Down
2 changes: 1 addition & 1 deletion client/finality-grandpa/src/observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ where
&voters,
self.client.clone(),
&self.network,
&self.keystore,
self.keystore.as_ref(),
None,
);

Expand Down