mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-27 16:19:59 -07:00
parser: add recap dataset
This commit is contained in:
@@ -45,6 +45,12 @@ impl Height {
|
||||
pub fn is_safe(&self, block_count: usize) -> bool {
|
||||
**self < (block_count - NUMBER_OF_UNSAFE_BLOCKS) as u32
|
||||
}
|
||||
|
||||
pub fn iter_range_inclusive(first: Height, last: Height) -> impl Iterator<Item = Height> {
|
||||
let range = (*first)..=(*last);
|
||||
|
||||
range.into_iter().map(Height::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq<u64> for Height {
|
||||
|
||||
Reference in New Issue
Block a user