mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-20 23:04:46 -07:00
general: snapshot
This commit is contained in:
@@ -12,6 +12,7 @@ use crate::{
|
||||
Databases, TxidToTxData, TxoutIndexToAddressIndex, TxoutIndexToAmount,
|
||||
},
|
||||
datasets::{AllDatasets, InsertData},
|
||||
log,
|
||||
states::{
|
||||
AddressCohortsInputStates, AddressCohortsOutputStates, AddressCohortsRealizedStates,
|
||||
States, UTXOCohortsOneShotStates, UTXOCohortsSentStates,
|
||||
@@ -53,6 +54,8 @@ pub fn parse(
|
||||
timestamp,
|
||||
}: ParseData,
|
||||
) {
|
||||
// log(&format!("{height}"));
|
||||
|
||||
// If false, expect that the code is flawless
|
||||
// or create a 0 value txid database
|
||||
let enable_check_if_txout_value_is_zero_in_db: bool = true;
|
||||
@@ -539,10 +542,6 @@ pub fn parse(
|
||||
}
|
||||
});
|
||||
|
||||
// if !txin_ordered_tx_datas.is_empty() {
|
||||
// panic!("txin_ordered_tx_indexes should've been fully consumed");
|
||||
// }
|
||||
|
||||
let mut utxo_cohorts_sent_states = UTXOCohortsSentStates::default();
|
||||
let mut utxo_cohorts_one_shot_states = UTXOCohortsOneShotStates::default();
|
||||
// let mut utxo_cohorts_received_states = UTXOCohortsReceivedStates::default();
|
||||
|
||||
@@ -61,6 +61,8 @@ impl UTXOCohortDurableStates {
|
||||
dbg!(
|
||||
report,
|
||||
"cents_to_amount decrement failed",
|
||||
rounded_price,
|
||||
price,
|
||||
amount,
|
||||
utxo_count
|
||||
);
|
||||
|
||||
@@ -129,7 +129,10 @@ impl UTXOCohortsDurableStates {
|
||||
self.initial_filtered_apply(&days_old, &year, |state| {
|
||||
state
|
||||
.decrement(amount, utxo_count, block_data.price)
|
||||
.unwrap();
|
||||
.unwrap_or_else(|report| {
|
||||
dbg!(report, block_data, sent_data, previous_last_block_data);
|
||||
panic!()
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user