]> Untitled Git - bdk/commit
fix(chain): clamp derivation index before apply_changeset
authorbusayo-OD <toyinoluwabusayo@gmail.com>
Sun, 6 Sep 2026 15:20:22 +0000 (16:20 +0100)
committerbusayo-OD <toyinoluwabusayo@gmail.com>
Sun, 6 Sep 2026 15:20:22 +0000 (16:20 +0100)
commit803fd968d7999bda911eb2b968cd54a585fac8b4
treedf02c3f4267b649e0ff81a881bf44771abf5bdec
parentacc06e53220960caa89efd5984d7b43914640dd4
fix(chain): clamp derivation index before apply_changeset

KeychainTxOutIndex::apply_changeset accepts ChangeSet::last_revealed
values above BIP32_MAX_INDEX, violating an invariant relied on by
the indexer.

Clamp each last_revealed value to BIP32_MAX_INDEX before storing
it, keeping changeset application infallible and monotone.
crates/chain/src/indexer/keychain_txout.rs