From: merge-script Date: Thu, 22 Oct 2026 03:20:52 +0000 (+1100) Subject: Merge bitcoindevkit/bdk#2417: fix(core): generalize is_empty for SyncResponse and... X-Git-Url: http://internal-gitweb-vhost/-client-interface/%22https:/src/macro.borrow_slice_impl.html?a=commitdiff_plain;h=HEAD;p=bdk Merge bitcoindevkit/bdk#2417: fix(core): generalize is_empty for SyncResponse and FullScanResponse and derive Clone, PartialEq cb1deabcac7a1ad19742f117656ebc08bb14d2ab fix(core): generalize is_empty for SyncResponse and FullScanResponse and derive Clone, PartialEq (bhuvan-somisetty) Pull request description: ### Description Fixes #2416. `SyncResponse` and `FullScanResponse` support custom checkpoint data types via their second generic parameter `D`: ```rust pub struct SyncResponse pub struct FullScanResponse ``` While their `Default` implementations are generic over `D`, their `is_empty()` methods were previously declared as: ```rust impl SyncResponse impl FullScanResponse ``` which constrained `is_empty()` to `D = BlockHash`, causing compilation failures when called on responses with custom checkpoint data types. This PR: - Changes `impl SyncResponse` to `impl SyncResponse`, making `is_empty()` available for any checkpoint type `D`. - Changes `impl FullScanResponse` to `impl FullScanResponse`. - Adds `Clone` and `PartialEq` derives to `SyncResponse`, `FullScanResponse`, and `TxUpdate`. - Adds `test_empty` assertions calling `is_empty()` on responses with a custom checkpoint type (these fail to compile without the fix). ### Notes to the reviewers Non-breaking change. Existing code using the default `D = BlockHash` continues to work unchanged. ### Changelog notice ### Fixed - `bdk_core`: `SyncResponse::is_empty` and `FullScanResponse::is_empty` are now generic over all checkpoint data types `D`. #2417 ### Added - `bdk_core`: Derived `Clone` and `PartialEq` on `SyncResponse`, `FullScanResponse`, and `TxUpdate`. #2417 ### Checklists #### All Submissions: * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) #### New Features: * [x] I've added tests for the new feature * [ ] I've added docs for the new feature #### Bugfixes: * [ ] This pull request breaks the existing API * [x] I've added tests to reproduce the issue which are now passing * [x] I'm linking the issue being fixed by this PR Signed-off-by: bhuvan-somisetty ACKs for top commit: evanlinjin: ACK cb1deabcac7a1ad19742f117656ebc08bb14d2ab Tree-SHA512: 150678735eaddf929c051c0eeef112edee8d70344c17c2846d85dc89baa7075e92273536b6bdf84120d481ca726f45b26452c062683664536fc09ab1394146f3 --- 7b68d280995da724ff8588f48a6b34666db4a9dd