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

@@ -2,7 +2,7 @@ use std::path::{Path, PathBuf};
use brk_indexer::Indexer;
pub use brk_parser::rpc;
use hodor::Exit;
use hodor::Hodor;
mod storage;
@@ -29,7 +29,7 @@ impl<const MODE: u8> Computer<MODE> {
}
impl Computer<SINGLE_THREAD> {
pub fn compute(&mut self, mut indexer: Indexer<SINGLE_THREAD>, exit: &Exit) -> color_eyre::Result<()> {
pub fn compute(&mut self, mut indexer: Indexer<SINGLE_THREAD>, hodor: &Hodor) -> color_eyre::Result<()> {
let height_count = indexer.vecs.height_to_size.len();
let txindexes_count = indexer.vecs.txindex_to_txid.len();
let txinindexes_count = indexer.vecs.txinindex_to_txoutindex.len();

View File

@@ -2,18 +2,22 @@ use std::path::Path;
use brk_computer::Computer;
use brk_indexer::Indexer;
use hodor::Exit;
use hodor::Hodor;
pub fn main() -> color_eyre::Result<()> {
color_eyre::install()?;
let exit = Exit::new();
let hodor = Hodor::new();
let i = std::time::Instant::now();
let outputs_dir = Path::new("../_outputs");
let outputs_dir = Path::new("../../_outputs");
Computer::import(&outputs_dir.join("computed"))?.compute(Indexer::import(&outputs_dir.join("indexes"))?, &exit)?;
let indexer = Indexer::import(&outputs_dir.join("indexes"))?;
let mut computer = Computer::import(&outputs_dir.join("computed"))?;
computer.compute(indexer, &hodor)?;
dbg!(i.elapsed());