]> Untitled Git - bdk/commit
feat(chain)!: wrap `TxGraph` txs with `Arc`
author志宇 <hello@evanlinjin.me>
Thu, 14 Mar 2024 06:20:51 +0000 (14:20 +0800)
committer志宇 <hello@evanlinjin.me>
Mon, 25 Mar 2024 04:57:26 +0000 (12:57 +0800)
commit8ab58af093ff295b86c3f8189aa96dea313092c4
treeee0ebe013462ec3e661bf86ae4f94710d34ec198
parent80e190b3e734a46ba73925d381fe4f1a9941bf2a
feat(chain)!: wrap `TxGraph` txs with `Arc`

Wrapping transactions as `Arc<Transaction>` allows us to share
transactions cheaply between the chain-source and receiving structures.
Therefore the chain-source can keep already-fetched transactions (save
bandwidth) and have a shared pointer to the transactions (save memory).

This is better than the current way we do things, which is to refer back
to the receiving structures mid-sync.

Documentation for `TxGraph` is also updated.
crates/bdk/src/wallet/mod.rs
crates/bdk/tests/wallet.rs
crates/chain/Cargo.toml
crates/chain/src/tx_graph.rs
crates/chain/tests/test_indexed_tx_graph.rs
crates/chain/tests/test_tx_graph.rs
crates/esplora/tests/async_ext.rs
crates/esplora/tests/blocking_ext.rs