Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion crates/esplora/src/async_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,11 @@ where
let mut update = TxUpdate::<ConfirmationBlockTime>::default();

// make sure txs exists in graph and tx statuses are updated
// TODO: We should maintain a tx cache (like we do with Electrum).
// A tx cache doesn't help here: Esplora's spk scan already returns full tx bodies (unlike
// Electrum, which needs a follow-up fetch per txid), and `inserted_txs` already dedupes
// against what that earlier spk phase fetched this sync. Swapping `get_tx_info` for
// `get_tx_status` to skip refetches is unsafe: unknown txids return HTTP 200
// {"confirmed":false}, so evicted txs would never be evicted.
update.extend(
fetch_txs_with_txids(
client,
Expand Down
6 changes: 5 additions & 1 deletion crates/esplora/src/blocking_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,11 @@ fn fetch_txs_with_outpoints<I: IntoIterator<Item = OutPoint>>(
let mut update = TxUpdate::<ConfirmationBlockTime>::default();

// make sure txs exists in graph and tx statuses are updated
// TODO: We should maintain a tx cache (like we do with Electrum).
// A tx cache doesn't help here: Esplora's spk scan already returns full tx bodies (unlike
// Electrum, which needs a follow-up fetch per txid), and `inserted_txs` already dedupes
// against what that earlier spk phase fetched this sync. Swapping `get_tx_info` for
// `get_tx_status` to skip refetches is unsafe: unknown txids return HTTP 200
// {"confirmed":false}, so evicted txs would never be evicted.
update.extend(fetch_txs_with_txids(
client,
start_time,
Expand Down