From ee8daa37cb327d2f3fb011f54e0c566e0004435d Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 22 Oct 2025 19:05:02 +0800 Subject: fix: usage of hash_chain fix: visibility of hash_chain funcs --- src/hash_chain.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/hash_chain.rs') diff --git a/src/hash_chain.rs b/src/hash_chain.rs index 0fe2c1d..f21b1d2 100644 --- a/src/hash_chain.rs +++ b/src/hash_chain.rs @@ -26,7 +26,7 @@ impl HashChain { this } - fn push(&mut self, data: T) { + pub fn push(&mut self, data: T) { let prev_hash = self .data .last() @@ -40,7 +40,7 @@ impl HashChain { // TODO: make try_last that does same as this but returns Err() if it's not the // last one and/or refuse to insert - fn insert(&mut self, data: T, base_hash: &Vec) { + pub fn insert(&mut self, data: T, base_hash: &Vec) { let pos = self .data .iter() @@ -53,7 +53,7 @@ impl HashChain { self.rehash(&base_hash); } - fn verify(&self, until_hash: &[u8]) -> bool { + pub fn verify(&self, until_hash: &[u8]) -> bool { let pos = self .data .iter() @@ -68,7 +68,7 @@ impl HashChain { }) } - fn rehash(&mut self, from_hash: &[u8]) { + pub fn rehash(&mut self, from_hash: &[u8]) { let pos = self .data .iter() -- cgit v1.2.3