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
+3 -3
View File
@@ -1,9 +1,9 @@
# biter
# BRK Parser
Biter (Bitcoin Block Iterator) is a very fast and simple Rust library which reads raw block files (*blkXXXXX.dat*) from Bitcoin Core Node and creates an iterator over all the requested blocks in sequential order (0, 1, 2, ...).
A very fast and simple Rust library which reads raw block files (*blkXXXXX.dat*) from Bitcoin Core node and creates an iterator over all the requested blocks in sequential order (0, 1, 2, ...).
The element returned by the iterator is a tuple which includes the:
- Height: `usize`
- Height: `Height`
- Block: `Block` (from `bitcoin-rust`)
- Block's Hash: `BlockHash` (also from `bitcoin-rust`)
+4
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`)
///
+4
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());
}