]> Untitled Git - bdk/commit
feat(chain)!: Change `TxGraph` to understand evicted-at & last-evicted
author志宇 <hello@evanlinjin.me>
Fri, 24 Jan 2025 08:45:00 +0000 (19:45 +1100)
committer志宇 <hello@evanlinjin.me>
Fri, 14 Mar 2025 02:15:16 +0000 (13:15 +1100)
commita2dfcb9f9c39ef90f808b034731df0edb712e740
tree0efb44b83d26a75ec13da29cfc172179a044f5ed
parentae0336b205f3b29253b5be3142dff54a4da09232
feat(chain)!: Change `TxGraph` to understand evicted-at & last-evicted

The evicted-at and last-evicted timestamp informs the `TxGraph` when the
transaction was last deemed as missing (evicted) from the mempool.

The canonicalization algorithm is changed to disregard transactions with
a last-evicted timestamp greater or equal to it's last-seen timestamp.
The exception is when we have a canonical descendant due to rules of
transitivity.

Update rusqlite_impl to persist `last_evicted`.

Also update docs:
* Remove duplicate paragraphs about `ChangeSet`s.
* Add "Canonicalization" section which expands on methods that require
  canonicalization and the associated data types used in the
  canonicalization algorithm.
crates/chain/src/rusqlite_impl.rs
crates/chain/src/tx_graph.rs
crates/chain/tests/test_tx_graph.rs