[bdk_chain_redesign] Change insert_relevant_txs method

Instead of forcing all transactions inserted to use the same anchors, we
change the API to have unique anchors per transaction.

This allows for more flexibility in general. For example, use `Anchor`
implementations that contain the position in a block of a transaction.
This commit is contained in:
志宇
2023-04-23 00:12:41 +08:00
parent ecc74ce4cd
commit 1b152647c5
2 changed files with 7 additions and 8 deletions

View File

@@ -61,7 +61,7 @@ fn insert_relevant_txs() {
let txs = [tx_c, tx_b, tx_a];
assert_eq!(
graph.insert_relevant_txs(&txs, None, None),
graph.insert_relevant_txs(txs.iter().map(|tx| (tx, None)), None),
IndexedAdditions {
graph_additions: Additions {
tx: txs.into(),