forked from bitcoindevkit/bdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(chain): introduce keychain-variant-ranking to
KeychainTxOutIndex
This fixes the bug where the result of applying individual changesets may result in a different outcome than applying the aggregate changeset. The nature of the changeset allows different keychain types to be associated with the same descriptor. The previous design did not take this into account. Methods of `KeychainTxOutIndex` only returns one keychain type per spk/txout/outpoint. This PR makes the keychain type returned to be consistent by ranking keychain variants by `Ord`. The lowest keychain variant (according to `Ord`) takes precedence.
- Loading branch information
1 parent
2e3105c
commit e1f3b53
Showing
1 changed file
with
79 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters