File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ impl PendingSweepBalance {
356
356
} => {
357
357
let channel_id = output_info. channel_id ;
358
358
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 ( ) ;
360
360
Self :: BroadcastAwaitingConfirmation {
361
361
channel_id,
362
362
latest_broadcast_height,
@@ -372,7 +372,7 @@ impl PendingSweepBalance {
372
372
} => {
373
373
let channel_id = output_info. channel_id ;
374
374
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 ( ) ;
376
376
Self :: AwaitingThresholdConfirmations {
377
377
channel_id,
378
378
latest_spending_txid,
Original file line number Diff line number Diff line change @@ -47,18 +47,15 @@ where
47
47
let mut receiver = self . queue_receiver . lock ( ) . await ;
48
48
while let Some ( next_package) = receiver. recv ( ) . await {
49
49
for tx in & next_package {
50
+ let txid = tx. compute_txid ( ) ;
50
51
let timeout_fut = tokio:: time:: timeout (
51
52
Duration :: from_secs ( TX_BROADCAST_TIMEOUT_SECS ) ,
52
53
self . esplora_client . broadcast ( tx) ,
53
54
) ;
54
55
match timeout_fut. await {
55
56
Ok ( res) => match res {
56
57
Ok ( ( ) ) => {
57
- log_trace ! (
58
- self . logger,
59
- "Successfully broadcast transaction {}" ,
60
- tx. txid( )
61
- ) ;
58
+ log_trace ! ( self . logger, "Successfully broadcast transaction {}" , txid) ;
62
59
} ,
63
60
Err ( e) => match e {
64
61
esplora_client:: Error :: Reqwest ( err) => {
85
82
log_error ! (
86
83
self . logger,
87
84
"Failed to broadcast transaction {}: {}" ,
88
- tx . txid( ) ,
85
+ txid,
89
86
e
90
87
) ;
91
88
log_trace ! (
100
97
log_error ! (
101
98
self . logger,
102
99
"Failed to broadcast transaction due to timeout {}: {}" ,
103
- tx . txid( ) ,
100
+ txid,
104
101
e
105
102
) ;
106
103
log_trace ! (
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ where
292
292
293
293
self . broadcaster . broadcast_transactions ( & [ & tx] ) ;
294
294
295
- let txid = tx. txid ( ) ;
295
+ let txid = tx. compute_txid ( ) ;
296
296
297
297
if let Some ( amount_sats) = amount_msat_or_drain {
298
298
log_info ! (
You can’t perform that action at this time.
0 commit comments