]> Untitled Git - bdk/commit
feat(chain)!: `TxGraph` contain anchors in one field
author志宇 <hello@evanlinjin.me>
Wed, 16 Oct 2024 14:28:23 +0000 (14:28 +0000)
committer志宇 <hello@evanlinjin.me>
Tue, 10 Dec 2024 09:16:38 +0000 (20:16 +1100)
commit0aa39f9e1ca406c55a1e33477ec3806c7cf8b9b5
treeb2e79889175cc7019ce3a5ffb573d875b0b8a6f4
parentab08b8cdd31c58071726a158f326591bb8d0a93c
feat(chain)!: `TxGraph` contain anchors in one field

Previously, the field `TxGraph::anchors` existed because we assumed
there was use in having a partially-chronological order of transactions
there. Turns out it wasn't used at all.

This commit removes anchors from the `txs` field and reworks `anchors`
field to be a map of `txid -> set<anchors>`.

This is a breaking change since the signature of `all_anchors()` is
changed.

Update `TxGraph` field docs for `empty_outspends` and `empty_anchors`.
crates/chain/src/tx_graph.rs
crates/chain/tests/test_tx_graph.rs