From b7475810d56d2dee523e6a206f1d364ed635fafe Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 16 Aug 2022 15:35:27 -0700 Subject: [PATCH] Return BlockHash from Index::all (#319) --- src/index.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.rs b/src/index.rs index 50e035ef63..796306bd9e 100644 --- a/src/index.rs +++ b/src/index.rs @@ -246,7 +246,7 @@ impl Index { ) } - pub(crate) fn all(&self) -> Result> { + pub(crate) fn all(&self) -> Result> { let mut blocks = Vec::new(); let tx = self.database.begin_read()?; @@ -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)