You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #288: Fix KeychainTxOutIndex recovery logic when spk-cache is enabled
e2814e8 fix: `KeychainTxOutIndex` recovery logic when spk-cache is enabled (志宇)
Pull request description:
### Description
We should ensure we populate the cache (from the changeset) before doing any other operation on `KeychainTxOutIndex` (i.e. inserting descriptors).
Otherwise we will end up re-deriving spks which have already been cached.
The test is also corrected to check that we don't duplicate deriving spks. A helper function `check_cache_cs` is added to make the tests more thorough and easier to read.
### Changelog notice
```md
Fixed:
* Recovering from spk-cache now works properly.
```
### 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 `just p` before pushing
#### Bugfixes:
* [x] I've added tests to reproduce the issue which are now passing
> ~* [ ] This pull request breaks the existing API~
> ~* [ ] I'm linking the issue being fixed by this PR~
ACKs for top commit:
ValuedMammal:
ACK e2814e8
oleonardolima:
cACK e2814e8
Tree-SHA512: fdfb2880e90664660634952fd461d01425dcaed38db46b23611d8768cb21924705c0455c3251a2353f5eb6155a302cb7a03a40c27ec8e9221ab4200b20a35f0d
0 commit comments