mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-29 00:59:58 -07:00
global: init readmes
This commit is contained in:
@@ -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`)
|
||||
///
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user