Skip to content

Conversation

@phrwlk
Copy link

@phrwlk phrwlk commented Jan 26, 2026

Previously fetch_txs_with_outpoints collected spend txids into a Vec, so the same txid could be pushed multiple times when one transaction spent several input outpoints. This caused redundant get_tx_info calls to Esplora for the same transaction, wasting network and CPU without changing the resulting TxUpdate.

Use HashSet<Txid> for missing_txs in both async and blocking fetch_txs_with_outpoints, so each txid is only requested once while keeping the observable behaviour of SyncResponse / TxUpdate unchanged.

Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK

Looks good, thanks for fixing this.

Just a minor thing before merging - could you combine the two commits and include the scope?

I.e.

fix(esplora): deduplicate missing txids in fetch_txs_with_outpoints

@phrwlk phrwlk force-pushed the fix/esplora-dedup-missing-txids-outpoints branch from 2c95146 to 0071ee6 Compare January 27, 2026 13:10
@phrwlk phrwlk changed the title Fix/esplora dedup missing txids outpoints fix(esplora): deduplicate missing txids in fetch_txs_with_outpoints Jan 27, 2026
@phrwlk
Copy link
Author

phrwlk commented Jan 27, 2026

cACK

Looks good, thanks for fixing this.

Just a minor thing before merging - could you combine the two commits and include the scope?

I.e.

fix(esplora): deduplicate missing txids in fetch_txs_with_outpoints

Did it

Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 787e07c

@evanlinjin evanlinjin force-pushed the fix/esplora-dedup-missing-txids-outpoints branch from 0071ee6 to 787e07c Compare January 28, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

3 participants