Skip to content

fix(sync-wallet): decouple batch broadcast from spend input matching#48

Open
dolcalmi wants to merge 15 commits intomainfrom
fix/sync-wallet-batch-broadcast-missing-inputs
Open

fix(sync-wallet): decouple batch broadcast from spend input matching#48
dolcalmi wants to merge 15 commits intomainfrom
fix/sync-wallet-batch-broadcast-missing-inputs

Conversation

@dolcalmi
Copy link
Copy Markdown

Summary

  • decouple batch broadcast ledger posting from spend-input matching so broadcast markers can be recorded even when spend accounting is deferred
  • add explicit spend-input state handling with structured missing-input diagnostics to avoid falsely syncing blocked spend transactions
  • add an e2e regression in tests/e2e/bitcoind_sync.bats covering batch-linked spends with missing inputs and validating broadcast marker plus diagnostics behavior

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the wallet sync job so batch-broadcast ledger recording can occur even when spend-input accounting must be deferred (e.g., when bria’s UTXO table is missing some inputs), and adds an e2e regression test to validate the behavior.

Changes:

  • Record batch-broadcast ledger markers independently from spend-input matching and spend accounting.
  • Add explicit spend-input state handling and structured diagnostics for missing inputs.
  • Add an e2e test covering a batch-linked spend with missing inputs, asserting broadcast marker presence plus diagnostics.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/job/sync_wallet.rs Refactors spend processing to separate batch-broadcast recording from spend-input matching and adds missing-input diagnostics.
tests/e2e/bitcoind_sync.bats Adds an e2e regression ensuring batch broadcast markers are set even when spend inputs are missing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/job/sync_wallet.rs Outdated
Comment thread src/job/sync_wallet.rs Outdated
Comment thread tests/e2e/bitcoind_sync.bats Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/job/sync_wallet.rs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/e2e/bitcoind_sync.bats
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/job/sync_wallet.rs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/job/sync_wallet.rs Outdated
@blinkbitcoin blinkbitcoin deleted a comment from Copilot AI Apr 11, 2026
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.

2 participants