global: reorg fixes + clients improved

This commit is contained in:
nym21
2026-01-28 23:35:51 +01:00
parent fecaf0f400
commit 6709ded66c
55 changed files with 4312 additions and 83 deletions
+10
View File
@@ -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(())
}
}
+5
View File
@@ -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);
};