Skip to content

Commit

Permalink
Return BlockHash from Index::all (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Aug 16, 2022
1 parent 1dfd2d2 commit b747581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl Index {
)
}

pub(crate) fn all(&self) -> Result<Vec<(u64, sha256d::Hash)>> {
pub(crate) fn all(&self) -> Result<Vec<(u64, BlockHash)>> {
let mut blocks = Vec::new();

let tx = self.database.begin_read()?;
Expand All @@ -256,7 +256,7 @@ impl Index {
let mut cursor = height_to_hash.range(0..)?.rev();

while let Some(next) = cursor.next() {
blocks.push((next.0, sha256d::Hash::from_slice(next.1)?));
blocks.push((next.0, BlockHash::from_slice(next.1)?));
}

Ok(blocks)
Expand Down

0 comments on commit b747581

Please sign in to comment.