Skip to content

wollet: waterfalls: fix last_unused on later pages - #212

Open
diorwave wants to merge 1 commit into
Blockstream:masterfrom
diorwave:waterfalls-last-unused
Open

diorwave wants to merge 1 commit into
Blockstream:masterfrom
diorwave:waterfalls-last-unused

Conversation

@diorwave

Copy link
Copy Markdown

Waterfalls scans computed last_unused relative to the page, so wallets with more than 1000 used addresses on a chain could return an already used address.

The test serves a two page scan from a local stub, it takes about 1s in debug builds because the first page derives 1000 addresses.

Fixes #209

- The last used index of each page was not offset by the page start,
  so every page with activity overwrote `last_unused` with a
  page-relative value.
- Wallets with more than 1000 used addresses on a chain could then
  return an already used address.

Fixes Blockstream#209

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wollet: Waterfalls scan sets last_unused to a page-relative index past the first page

1 participant