mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-06 04:09:09 -07:00
computer: convert stores to vecs part 2
This commit is contained in:
@@ -57,6 +57,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unreachable_code, unused_variables)]
|
||||
pub fn import(parent: &Path, name: &str, version: Version) -> Result<Self> {
|
||||
panic!("Compressed vecs are a work in progress right now, please use raw vecs instead");
|
||||
|
||||
|
||||
@@ -62,6 +62,11 @@ where
|
||||
self.0.mut_header().update_height(height);
|
||||
}
|
||||
|
||||
pub fn reset(&mut self) -> Result<()> {
|
||||
self.update_height(Height::ZERO);
|
||||
self.0.reset()
|
||||
}
|
||||
|
||||
pub fn truncate_if_needed(&mut self, index: I, height: Height) -> Result<()> {
|
||||
self.update_height(height);
|
||||
self.0.truncate_if_needed(index)?;
|
||||
|
||||
Reference in New Issue
Block a user