mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-03 02:50:00 -07:00
global: snapshot
This commit is contained in:
@@ -221,7 +221,7 @@ where
|
||||
I: StoredRaw + StoredIndex + From<usize>,
|
||||
T: StoredRaw,
|
||||
{
|
||||
let h = Height::from(u64::from(height_to_index.stamp()));
|
||||
let h = Height::from(height_to_index.stamp());
|
||||
if h.is_zero() {
|
||||
None
|
||||
} else if h + 1_u32 == starting_height {
|
||||
|
||||
@@ -800,6 +800,10 @@ impl Indexer {
|
||||
|
||||
Ok(starting_indexes)
|
||||
}
|
||||
|
||||
pub fn static_clone(&self) -> &'static Self {
|
||||
Box::leak(Box::new(self.clone()))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -443,7 +443,7 @@ impl Vecs {
|
||||
pub fn flush(&mut self, height: Height) -> Result<()> {
|
||||
self.mut_vecs()
|
||||
.into_par_iter()
|
||||
.try_for_each(|vec| vec.stamped_flush(Stamp::from(u64::from(height))))?;
|
||||
.try_for_each(|vec| vec.stamped_flush(Stamp::from(height)))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ impl Vecs {
|
||||
self.mut_vecs()
|
||||
.into_iter()
|
||||
.map(|vec| {
|
||||
let h = Height::from(u64::from(vec.stamp()));
|
||||
let h = Height::from(vec.stamp());
|
||||
if h > Height::ZERO { h.incremented() } else { h }
|
||||
})
|
||||
.min()
|
||||
|
||||
Reference in New Issue
Block a user