global: init readmes

This commit is contained in:
nym21
2025-02-26 10:07:05 +01:00
parent 01ecae8979
commit bb61b3dc22
19 changed files with 75 additions and 44 deletions

View File

@@ -54,6 +54,10 @@ impl Parser {
}
}
pub fn get(&self, height: Height) -> Block {
self.parse(Some(height), Some(height)).iter().next().unwrap().1
}
///
/// Returns a crossbeam channel receiver that receives `(Height, Block, BlockHash)` tuples from an **inclusive** range (`start` and `end`)
///

View File

@@ -1,6 +1,7 @@
use std::path::Path;
use bitcoincore_rpc::{Auth, Client};
use brk_core::Height;
use brk_parser::Parser;
fn main() {
@@ -24,5 +25,8 @@ fn main() {
println!("{height}: {hash}");
});
parser.get(Height::new(0));
parser.get(Height::new(840_000));
dbg!(i.elapsed());
}