Skip to content

Conversation

@ldiego08
Copy link
Contributor

@ldiego08 ldiego08 commented Feb 2, 2026

Overview

Add address reuse for change addresses that were requested but not used in transactions. The wallet keeps a record of addresses in a new UNUSED_CHANGE_ADDRESSES table and fetches from it before requesting new ones from the Bitcoin node.

Changes

  • Add new UNUSED_CHANGE_ADDRESSES table.
  • Update get_change_address() to fetch addresses from the table or fall back to the Bitcoin node.
  • Update transaction-building fns to automatically save unused change addresses after builds complete or fail.
  • Add validation to discard addresses from the table if they've been used externally.

Related issues

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.

Reuse unused/skipped change addresses

1 participant