From: Steve Myers Date: Wed, 30 Nov 2022 17:05:25 +0000 (-0800) Subject: Merge bitcoindevkit/bdk#806: Ensure there are no duplicated script_pubkeys in sqlite X-Git-Tag: v0.25.0-rc.1~1 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/-sqlite-db-configuration/scripts/struct.CommandStringError.html?a=commitdiff_plain;h=4c5ceaff140fca503c13109e9dcfd5e0ef7c3520;p=bdk Merge bitcoindevkit/bdk#806: Ensure there are no duplicated script_pubkeys in sqlite b5fcddcf1ab795b96481f3e46da9356e4f9c8b41 Add sqlite migration to drop duplicated script_pubkeys rows (Steve Myers) 21c96c9c811337ba04a0f85b48a7dec58ba8b416 Add test for issue #801 (Alekos Filini) c51d544932a666851c39f79a517e2e0a1e783b05 [wip] Ensure there are no duplicated script_pubkeys in sqlite (Alekos Filini) Pull request description: ### Description Add a `UNIQUE` constraint on the script_pubkeys table so that it doesn't grow constantly when caching new addresses. Fixes #801 ### Notes to the reviewers Adding it to the 0.25 milestone since it's just a bugfix. Still in draft because I need to add extra migration queries to clean up existing dbs. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### 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 ACKs for top commit: notmandatory: ACK b5fcddcf1ab795b96481f3e46da9356e4f9c8b41 Tree-SHA512: 7b10e453bb38af5c4f80f77692a56e37259680e50f9c2c9e554a0e5f04fb9cab897da6476c6c9930f1c501b455472984a1c92c4f137cff49acdc390d2e705107 --- 4c5ceaff140fca503c13109e9dcfd5e0ef7c3520