chain: split IndexedTxGraph::insert_tx into 3 methods

Instead of inserting anchors and seen_at timestamp in the same method,
we have three separate methods. This makes the API easier to understand
and makes `IndexedTxGraph` more consistent with the `TxGraph` API.
This commit is contained in:
志宇 committed 2023-10-09 22:14:04 +08:00
1 parent 4f5695d43a
commit 6d4b33ef91
3 files changed
+27 -26

No files matched your search

+1 -2
View File
@@ -624,8 +624,7 @@ where
Ok(_) => {
println!("Broadcasted Tx : {}", transaction.txid());
let keychain_changeset =
graph.lock().unwrap().insert_tx(&transaction, None, None);
let keychain_changeset = graph.lock().unwrap().insert_tx(transaction);
// We know the tx is at least unconfirmed now. Note if persisting here fails,
// it's not a big deal since we can always find it again form