]> Untitled Git - bdk/commit
fix(chain): reject an occupied index in insert_spk
authorhassan <144530465+h55n@users.noreply.github.com>
Fri, 2 Oct 2026 00:18:20 +0000 (05:48 +0530)
committer志宇 <hello@evanlinjin.me>
Sun, 18 Oct 2026 09:17:00 +0000 (20:17 +1100)
commitee1909efdbe53261e268819cf7d1cd9260a03df0
tree31e7bef6751010eb0fa5f7568c1a46cec6b0a73b
parent09eda874e3393c6abde21a42e41929306e643e4a
fix(chain): reject an occupied index in insert_spk

Reject an occupied index before changing either lookup map. Preserve existing script, scanned-output and used-status mappings on a rejected insertion, matching the existing behavior for an occupied script.

Signed-off-by: hassan <144530465+h55n@users.noreply.github.com>
crates/chain/src/indexer/spk_txout.rs
crates/chain/tests/test_spk_txout_index.rs