Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: teor <[email protected]>
  • Loading branch information
arya2 and teor2345 committed Mar 23, 2023
1 parent 9292144 commit 9674ccb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zebra-state/src/service/non_finalized_state/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ impl Chain {

/// Returns true is the chain contains the given block hash.
/// Returns false otherwise.
pub fn contains(&self, hash: &block::Hash) -> bool {
pub fn contains_block_hash(&self, hash: &block::Hash) -> bool {
self.height_by_hash.contains_key(hash)
}

Expand Down
2 changes: 1 addition & 1 deletion zebra-state/src/service/queued_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ impl QueuedBlocks {

/// Returns true if QueuedBlocks contains a block with the given hash.
/// Returns false otherwise.
pub fn contains(&self, hash: &block::Hash) -> bool {
pub fn contains_block_hash(&self, hash: &block::Hash) -> bool {
self.blocks.contains_key(hash)
}
}
Expand Down
2 changes: 1 addition & 1 deletion zebrad/src/components/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ where
.map_err(|e| eyre!(e))?
{
zs::Response::KnownBlock(loc) => Ok(loc.is_some()),
_ => unreachable!("wrong response to depth request"),
_ => unreachable!("wrong response to known block request"),
}
}

Expand Down

0 comments on commit 9674ccb

Please sign in to comment.