Skip to content

Commit b8db48b

Browse files
committed
f RB: Account for txid() being deprecated
1 parent 216d234 commit b8db48b

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

src/balance.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ impl PendingSweepBalance {
356356
} => {
357357
let channel_id = output_info.channel_id;
358358
let amount_satoshis = value_from_descriptor(&output_info.descriptor).to_sat();
359-
let latest_spending_txid = latest_spending_tx.txid();
359+
let latest_spending_txid = latest_spending_tx.compute_txid();
360360
Self::BroadcastAwaitingConfirmation {
361361
channel_id,
362362
latest_broadcast_height,
@@ -372,7 +372,7 @@ impl PendingSweepBalance {
372372
} => {
373373
let channel_id = output_info.channel_id;
374374
let amount_satoshis = value_from_descriptor(&output_info.descriptor).to_sat();
375-
let latest_spending_txid = latest_spending_tx.txid();
375+
let latest_spending_txid = latest_spending_tx.compute_txid();
376376
Self::AwaitingThresholdConfirmations {
377377
channel_id,
378378
latest_spending_txid,

src/tx_broadcaster.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,15 @@ where
4747
let mut receiver = self.queue_receiver.lock().await;
4848
while let Some(next_package) = receiver.recv().await {
4949
for tx in &next_package {
50+
let txid = tx.compute_txid();
5051
let timeout_fut = tokio::time::timeout(
5152
Duration::from_secs(TX_BROADCAST_TIMEOUT_SECS),
5253
self.esplora_client.broadcast(tx),
5354
);
5455
match timeout_fut.await {
5556
Ok(res) => match res {
5657
Ok(()) => {
57-
log_trace!(
58-
self.logger,
59-
"Successfully broadcast transaction {}",
60-
tx.txid()
61-
);
58+
log_trace!(self.logger, "Successfully broadcast transaction {}", txid);
6259
},
6360
Err(e) => match e {
6461
esplora_client::Error::Reqwest(err) => {
@@ -85,7 +82,7 @@ where
8582
log_error!(
8683
self.logger,
8784
"Failed to broadcast transaction {}: {}",
88-
tx.txid(),
85+
txid,
8986
e
9087
);
9188
log_trace!(
@@ -100,7 +97,7 @@ where
10097
log_error!(
10198
self.logger,
10299
"Failed to broadcast transaction due to timeout {}: {}",
103-
tx.txid(),
100+
txid,
104101
e
105102
);
106103
log_trace!(

src/wallet/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ where
292292

293293
self.broadcaster.broadcast_transactions(&[&tx]);
294294

295-
let txid = tx.txid();
295+
let txid = tx.compute_txid();
296296

297297
if let Some(amount_sats) = amount_msat_or_drain {
298298
log_info!(

0 commit comments

Comments
 (0)