Skip to content

Commit

Permalink
chore: add more logging
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
  • Loading branch information
gregdhill committed Sep 12, 2023
1 parent a86c737 commit 156c964
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bitcoin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,7 @@ impl BitcoinCoreApi for BitcoinCore {

for entry in unspent {
if self.electrs_client.is_tx_output_spent(&entry.txid, entry.vout).await? {
log::info!("{}:{} already spent", entry.txid, entry.vout);
// skip if already spent
continue;
}
Expand All @@ -1078,6 +1079,8 @@ impl BitcoinCoreApi for BitcoinCore {
})
}

log::info!("Sweeping {} from {} utxos", amount, utxos.len());

let mut outputs = serde_json::Map::<String, serde_json::Value>::new();
outputs.insert(address.to_string(), serde_json::Value::from(amount.to_btc()));

Expand Down

0 comments on commit 156c964

Please sign in to comment.