]> Untitled Git - bdk/commit
refactor(chain): replace `ScriptBuf` with `AsRef<Script>` in SPK index methods
authorYuki Kishimoto <yukikishimoto@protonmail.com>
Mon, 29 Sep 2025 11:58:10 +0000 (08:58 -0300)
committerYuki Kishimoto <yukikishimoto@protonmail.com>
Tue, 30 Sep 2025 11:29:57 +0000 (08:29 -0300)
commitc095145864a97b5efb4c90ef81989185b5a06998
tree708f364241b3ad6390cd5d916b342802a2c39764
parent00efcdee5d4d2c5473b15da358aec474327d4d73
refactor(chain): replace `ScriptBuf` with `AsRef<Script>` in SPK index methods

Replace `ScriptBuf` with `AsRef<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.

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
crates/chain/src/indexer/keychain_txout.rs
crates/chain/src/indexer/spk_txout.rs
crates/chain/tests/test_tx_graph_conflicts.rs
examples/example_cli/src/lib.rs