We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18fad46 commit bfc323aCopy full SHA for bfc323a
src/new_index/mempool.rs
@@ -309,6 +309,18 @@ impl Mempool {
309
txids.push(txid);
310
self.txstore.insert(txid, tx);
311
}
312
+
313
+ // Populate tx cache
314
+ let txid_misses = self.chain.txs_cache_miss(&txids);
315
+ let mut tx_misses = vec![];
316
+ for txid in txid_misses {
317
+ if let Some(tx) = self.txstore.get(&txid) {
318
+ let bytes = serialize(tx);
319
+ tx_misses.push((txid, bytes));
320
+ }
321
322
+ self.chain.add_txs_to_cache(&tx_misses);
323
324
// Phase 2: index history and spend edges (can fail if some txos cannot be found)
325
let txos = match self.lookup_txos(self.get_prevouts(&txids)) {
326
Ok(txos) => txos,
0 commit comments