README: add badges

This commit is contained in:
nym21
2025-03-15 17:51:54 +01:00
parent 7441011ae7
commit 07493ab0a6
4 changed files with 25 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
use std::{path::Path, thread::sleep, time::Duration};
use std::path::Path;
use brk_computer::Computer;
use brk_core::default_bitcoin_path;
@@ -7,9 +7,8 @@ use brk_fetcher::Fetcher;
use brk_indexer::Indexer;
use brk_parser::{
Parser,
rpc::{self, RpcApi},
rpc::{self},
};
use log::info;
pub fn main() -> color_eyre::Result<()> {
color_eyre::install()?;
@@ -40,22 +39,9 @@ pub fn main() -> color_eyre::Result<()> {
computer.import_stores()?;
computer.import_vecs()?;
loop {
let block_count = rpc.get_block_count()?;
let starting_indexes = indexer.index(&parser, rpc, &exit)?;
info!("{block_count} blocks found.");
computer.compute(&mut indexer, starting_indexes, &exit)?;
let starting_indexes = indexer.index(&parser, rpc, &exit)?;
computer.compute(&mut indexer, starting_indexes, &exit)?;
info!("Waiting for new blocks...");
while block_count == rpc.get_block_count()? {
sleep(Duration::from_secs(1))
}
}
#[allow(unreachable_code)]
Ok(())
}

View File

@@ -23,7 +23,7 @@ fn main() -> color_eyre::Result<()> {
let parser = Parser::new(bitcoin_dir.join("blocks"), rpc);
let outputs = dot_brk_path().join("outputs");
let outputs = Path::new("../../_outputs");
let mut indexer = Indexer::new(outputs.join("indexed").to_owned(), true, true)?;