Skip to content

test(core): cover SyncRequest progress and expected txids#2233

Open
haoshengzhen wants to merge 1 commit into
bitcoindevkit:masterfrom
haoshengzhen:my_feature_for_add_test
Open

test(core): cover SyncRequest progress and expected txids#2233
haoshengzhen wants to merge 1 commit into
bitcoindevkit:masterfrom
haoshengzhen:my_feature_for_add_test

Conversation

@haoshengzhen

@haoshengzhen haoshengzhen commented Jun 19, 2026

Copy link
Copy Markdown

Description

Adds coverage for SyncRequest behavior in bdk_core::spk_client.

The new tests verify that:

  • SyncRequest reports progress correctly as scripts, txids, and outpoints are consumed.
  • the inspect callback observes the post-consumption progress for each item.
  • expected txids are returned only for the matching script pubkey.

Notes to the reviewers

This is a test-only change. I chose this area because SyncRequest is public API used by chain clients, but the existing spk_client test coverage only checked empty response defaults. Covering progress reporting and expected txid matching helps lock in behavior that client integrations may rely on, without changing the implementation or API surface.

Changelog notice

No changelog entry needed; this is test coverage only.

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

Signed-off-by: haoshengzhen <haoshengzhen@outlook.com>
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.06%. Comparing base (6d03fc3) to head (36ad42f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2233      +/-   ##
==========================================
+ Coverage   78.65%   79.06%   +0.40%     
==========================================
  Files          30       30              
  Lines        5909     5909              
  Branches      279      280       +1     
==========================================
+ Hits         4648     4672      +24     
+ Misses       1185     1160      -25     
- Partials       76       77       +1     
Flag Coverage Δ
rust 79.06% <ø> (+0.40%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant