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:
志宇
2023-10-06 11:07:00 +08:00
parent 4f5695d43a
commit 6d4b33ef91
3 changed files with 27 additions and 26 deletions

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