]> Untitled Git - bdk/commit
Merge bitcoindevkit/bdk#2052: chain: replace `ScriptBuf` with `&Script` in SPK index...
authormerge-script <hello@evanlinjin.me>
Thu, 2 Oct 2025 05:34:52 +0000 (05:34 +0000)
committermerge-script <hello@evanlinjin.me>
Thu, 2 Oct 2025 05:34:52 +0000 (05:34 +0000)
commit00b5f0223de2f7eacf8bb2f4799d6ad21884059d
treeaec36ced10abc5bcb0aed04794b8105aceb81b60
parent24654a51bd0a82c74c4cb0dff74e5f94c34d01ee
parentc095145864a97b5efb4c90ef81989185b5a06998
Merge bitcoindevkit/bdk#2052: chain: replace `ScriptBuf` with `&Script` in SPK index methods

c095145864a97b5efb4c90ef81989185b5a06998 refactor(chain): replace `ScriptBuf` with `AsRef<Script>` in SPK index methods (Yuki Kishimoto)

Pull request description:

  ### Description

  Replace `ScriptBuf` with `&Script` in `SpkTxOutIndex::index_of_spk` and `KeychainTxOutIndex::index_of_spk` methods, to avoid the need of cloning the `ScriptBuf` for a SPK index lookup.

  ### Changelog notice

  Breaking changes:
  - Change `SpkTxOutIndex::index_of_spk` and `KeychainTxOutIndex::index_of_spk` args from `ScriptBuf` to `&Script`.

  ### Checklists

  #### All Submissions:

  * [X] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)

  #### New Features:

  * [ ] I've added tests for the new feature
  * [ ] I've added docs for the new feature

  #### Bugfixes:

  * [X] 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

ACKs for top commit:
  oleonardolima:
    cACK c095145864a97b5efb4c90ef81989185b5a06998
  evanlinjin:
    ACK c095145864a97b5efb4c90ef81989185b5a06998

Tree-SHA512: f77bb4d9b58a682f7b0371ec1a76b2e6cca2bc0a76181d085bb7905d99a5eb4ca8907c6f2b229d38893673aa186eea0c79431b8736a67932c9956cd97f99f085