mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-11 06:39:08 -07:00
computer: libc sync
This commit is contained in:
@@ -22,7 +22,7 @@ brk_vec = { workspace = true }
|
||||
color-eyre = { workspace = true }
|
||||
derive_deref = { workspace = true }
|
||||
fjall = { workspace = true }
|
||||
libc = "0.2.174"
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
rayon = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
|
||||
@@ -178,15 +178,15 @@ impl Vecs {
|
||||
exit,
|
||||
)?;
|
||||
|
||||
// self.cointime.compute(
|
||||
// indexer,
|
||||
// &self.indexes,
|
||||
// &starting_indexes,
|
||||
// self.fetched.as_ref(),
|
||||
// &self.transactions,
|
||||
// &self.stateful,
|
||||
// exit,
|
||||
// )?;
|
||||
self.cointime.compute(
|
||||
indexer,
|
||||
&self.indexes,
|
||||
&starting_indexes,
|
||||
self.fetched.as_ref(),
|
||||
&self.transactions,
|
||||
&self.stateful,
|
||||
exit,
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use std::{path::Path, time::Instant};
|
||||
use std::path::Path;
|
||||
|
||||
use brk_core::{
|
||||
AddressGroups, Bitcoin, ByAmountRange, ByGreatEqualAmount, ByLowerThanAmount, DateIndex,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use std::{cmp::Ordering, collections::BTreeMap, mem, path::Path, thread, time::Instant};
|
||||
use std::{cmp::Ordering, collections::BTreeMap, mem, path::Path, thread};
|
||||
|
||||
use brk_core::{
|
||||
AnyAddressDataIndexEnum, AnyAddressIndex, ByAddressType, ByAnyAddress, CheckedSub, DateIndex,
|
||||
@@ -531,6 +531,8 @@ impl Vecs {
|
||||
starting_indexes: &mut Indexes,
|
||||
exit: &Exit,
|
||||
) -> color_eyre::Result<()> {
|
||||
unsafe { libc::sync() }
|
||||
|
||||
let height_to_first_outputindex = &indexer.vecs.height_to_first_outputindex;
|
||||
let height_to_first_inputindex = &indexer.vecs.height_to_first_inputindex;
|
||||
let height_to_first_p2aaddressindex = &indexer.vecs.height_to_first_p2aaddressindex;
|
||||
@@ -1265,6 +1267,10 @@ impl Vecs {
|
||||
exit.block();
|
||||
}
|
||||
|
||||
unsafe { libc::sync() }
|
||||
|
||||
// return Ok(());
|
||||
|
||||
info!("Computing overlapping...");
|
||||
|
||||
self.utxo_cohorts
|
||||
@@ -1347,6 +1353,8 @@ impl Vecs {
|
||||
self.utxo_cohorts
|
||||
.compute_rest_part1(indexer, indexes, fetched, starting_indexes, exit)?;
|
||||
|
||||
unsafe { libc::sync() }
|
||||
|
||||
self.address_cohorts.compute_rest_part1(
|
||||
indexer,
|
||||
indexes,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use std::{collections::BTreeMap, ops::ControlFlow, path::Path, time::Instant};
|
||||
use std::{collections::BTreeMap, ops::ControlFlow, path::Path};
|
||||
|
||||
use brk_core::{
|
||||
Bitcoin, ByAgeRange, ByAmountRange, ByEpoch, ByGreatEqualAmount, ByLowerThanAmount, ByMaxAge,
|
||||
|
||||
@@ -18,5 +18,6 @@ brk_store = { workspace = true }
|
||||
brk_vec = { workspace = true }
|
||||
color-eyre = { workspace = true }
|
||||
fjall = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
rayon = { workspace = true }
|
||||
|
||||
@@ -761,6 +761,8 @@ impl Indexer {
|
||||
|
||||
export_if_needed(stores, vecs, idxs.height, true, exit)?;
|
||||
|
||||
unsafe { libc::sync() }
|
||||
|
||||
Ok(starting_indexes)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user