mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-17 13:24:49 -07:00
indexer: small changes
This commit is contained in:
@@ -27,7 +27,7 @@ pub use stores::*;
|
|||||||
pub use vecs::*;
|
pub use vecs::*;
|
||||||
|
|
||||||
const SNAPSHOT_BLOCK_RANGE: usize = 1000;
|
const SNAPSHOT_BLOCK_RANGE: usize = 1000;
|
||||||
const COLLISIONS_CHECKED_UP_TO: Height = Height::new(415_000);
|
const COLLISIONS_CHECKED_UP_TO: Height = Height::new(907_000);
|
||||||
const VERSION: Version = Version::ONE;
|
const VERSION: Version = Version::ONE;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
@@ -104,20 +104,16 @@ impl Indexer {
|
|||||||
|stores: &mut Stores, vecs: &mut Vecs, height: Height, exit: &Exit| -> Result<()> {
|
|stores: &mut Stores, vecs: &mut Vecs, height: Height, exit: &Exit| -> Result<()> {
|
||||||
info!("Exporting...");
|
info!("Exporting...");
|
||||||
let _lock = exit.lock();
|
let _lock = exit.lock();
|
||||||
thread::scope(|scope| -> Result<()> {
|
let i = Instant::now();
|
||||||
scope.spawn(|| {
|
stores.commit(height).unwrap();
|
||||||
let i = Instant::now();
|
info!("Commited stores in {}s", i.elapsed().as_secs());
|
||||||
stores.commit(height).unwrap();
|
let i = Instant::now();
|
||||||
info!("Commited stores in {}s", i.elapsed().as_secs());
|
vecs.flush(height)?;
|
||||||
});
|
info!("Flushed vecs in {}s", i.elapsed().as_secs());
|
||||||
let i = Instant::now();
|
let i = Instant::now();
|
||||||
vecs.flush(height)?;
|
file.flush()?;
|
||||||
info!("Flushed vecs in {}s", i.elapsed().as_secs());
|
info!("Flushed file in {}s", i.elapsed().as_secs());
|
||||||
let i = Instant::now();
|
Ok(())
|
||||||
file.flush()?;
|
|
||||||
info!("Flushed file in {}s", i.elapsed().as_secs());
|
|
||||||
Ok(())
|
|
||||||
})
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut txindex_to_first_outputindex_reader_opt = None;
|
let mut txindex_to_first_outputindex_reader_opt = None;
|
||||||
|
|||||||
Reference in New Issue
Block a user