Describe the bug
There is a problem with the sync command in the esplora/electrum examples. Because of the 1000 lookahead default, we are trying to fetch txs for each spk (inc. lookahead).
We are fetching spks using SpkTxOutIndex::all_spks() and SpkTxOutIndex::unused_spks() to pass into {Electrum|Esplora}::sync (which includes lookahead spks).
To Reproduce
Run sync command with esplora/electrum cli examples (not wallet).
Expected behavior
We only fetch histories of revealed spks.
Suggested implementation
We probably need methods on KeychainTxOutIndex for non-lookahead versions for all_spks and unused_spks.
Maybe it is a bad idea to expose methods of SpkTxOutIndex from KeychainTxOutIndex?
Describe the bug
There is a problem with the sync command in the esplora/electrum examples. Because of the 1000 lookahead default, we are trying to fetch txs for each spk (inc. lookahead).
We are fetching spks using
SpkTxOutIndex::all_spks()andSpkTxOutIndex::unused_spks()to pass into{Electrum|Esplora}::sync(which includes lookahead spks).To Reproduce
Run
synccommand with esplora/electrum cli examples (not wallet).Expected behavior
We only fetch histories of revealed spks.
Suggested implementation
We probably need methods on
KeychainTxOutIndexfor non-lookahead versions forall_spksandunused_spks.Maybe it is a bad idea to expose methods of
SpkTxOutIndexfromKeychainTxOutIndex?