mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 06:39:58 -07:00
global: MASSIVE snapshot
This commit is contained in:
@@ -1,33 +1,18 @@
|
||||
use std::{env, path::Path, thread, time::Instant};
|
||||
use std::{env, path::Path, time::Instant};
|
||||
|
||||
use brk_computer::Computer;
|
||||
use brk_error::Result;
|
||||
use brk_fetcher::Fetcher;
|
||||
use brk_indexer::Indexer;
|
||||
use vecdb::{AnySerializableVec, AnyVec, Exit};
|
||||
use vecdb::{AnySerializableVec, AnyVec};
|
||||
|
||||
pub fn main() -> Result<()> {
|
||||
// Can't increase main thread's stack size, thus we need to use another thread
|
||||
thread::Builder::new()
|
||||
.stack_size(512 * 1024 * 1024)
|
||||
.spawn(run)?
|
||||
.join()
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
fn run() -> Result<()> {
|
||||
brk_logger::init(None)?;
|
||||
|
||||
let outputs_dir = Path::new(&env::var("HOME").unwrap()).join(".brk");
|
||||
|
||||
let indexer = Indexer::forced_import(&outputs_dir)?;
|
||||
|
||||
let fetcher = Fetcher::import(None)?;
|
||||
|
||||
let exit = Exit::new();
|
||||
exit.set_ctrlc_handler();
|
||||
|
||||
let computer = Computer::forced_import(&outputs_dir, &indexer, Some(fetcher))?;
|
||||
let computer = Computer::forced_import(&outputs_dir, &indexer)?;
|
||||
|
||||
// Test emptyaddressdata (underlying BytesVec) - direct access
|
||||
let empty_data = &computer.distribution.addresses_data.empty;
|
||||
|
||||
Reference in New Issue
Block a user