mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-28 19:28:11 -07:00
global: reorg fixes + clients improved
This commit is contained in:
@@ -78,6 +78,8 @@ impl<'a> BlockProcessor<'a> {
|
||||
|
||||
pub fn store_transaction_metadata(&mut self, txs: Vec<ComputedTx>) -> Result<()> {
|
||||
let height = self.height;
|
||||
let mut inserted = 0usize;
|
||||
let mut skipped = 0usize;
|
||||
|
||||
for ct in txs {
|
||||
if ct.prev_txindex_opt.is_none() {
|
||||
@@ -86,6 +88,9 @@ impl<'a> BlockProcessor<'a> {
|
||||
ct.txindex,
|
||||
height,
|
||||
);
|
||||
inserted += 1;
|
||||
} else {
|
||||
skipped += 1;
|
||||
}
|
||||
|
||||
self.vecs
|
||||
@@ -118,6 +123,11 @@ impl<'a> BlockProcessor<'a> {
|
||||
.checked_push(ct.txindex, StoredBool::from(ct.tx.is_explicitly_rbf()))?;
|
||||
}
|
||||
|
||||
tracing::debug!(
|
||||
"store_transaction_metadata: height={}, inserted={}, skipped={}",
|
||||
height, inserted, skipped
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,11 @@ impl<'a> BlockProcessor<'a> {
|
||||
{
|
||||
txindex
|
||||
} else {
|
||||
let store_result = self.stores.txidprefix_to_txindex.get(&txid_prefix)?;
|
||||
tracing::error!(
|
||||
"UnknownTxid: txid={}, prefix={:?}, store_result={:?}, current_txindex={:?}",
|
||||
txid, txid_prefix, store_result, self.indexes.txindex
|
||||
);
|
||||
return Err(Error::UnknownTxid);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user