Skip to content
Merged
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
minor cosmetic change
  • Loading branch information
maciejnems committed Jan 17, 2023
commit 444e17703eb2ec405bb766ae2b38192cd1e4c8fd
10 changes: 7 additions & 3 deletions finality-aleph/src/sync/substrate/verification/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ where

/// Download authorities for the session and return `SessionVerifier` for them. `session_id` should be the first session,
/// or the first block from the session number `session_id - 1` should be finalized.
fn download<AP: AuthorityProvider<BlockNumber>>(
fn download_session_verifier<AP: AuthorityProvider<BlockNumber>>(
authority_provider: &AP,
session_id: SessionId,
session_period: SessionPeriod,
Expand Down Expand Up @@ -139,8 +139,12 @@ where
let verifier = match self.sessions.entry(session_id) {
Entry::Occupied(occupied) => occupied.into_mut(),
Entry::Vacant(vacant) => {
let verifier = download(&self.authority_provider, session_id, self.session_period)
.ok_or(CacheError::UnknownAuthorities(session_id))?;
let verifier = download_session_verifier(
&self.authority_provider,
session_id,
self.session_period,
)
.ok_or(CacheError::UnknownAuthorities(session_id))?;
vacant.insert(verifier)
}
};
Expand Down