Skip to content

Sync command grabs histories from lookahead spks. #1268

@evanlinjin

Description

@evanlinjin

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions