@@ -270,7 +270,7 @@ where
270
270
let mut confirmed_txs: Vec < ConfirmedTx > = Vec :: new ( ) ;
271
271
272
272
for txid in & sync_state. watched_transactions {
273
- if confirmed_txs. iter ( ) . any ( |ctx| ctx. tx . txid ( ) == * txid) {
273
+ if confirmed_txs. iter ( ) . any ( |ctx| ctx. txid == * txid) {
274
274
continue ;
275
275
}
276
276
if let Some ( confirmed_tx) = maybe_await ! ( self . get_confirmed_tx( & txid, None , None ) ) ? {
@@ -284,7 +284,7 @@ where
284
284
{
285
285
if let Some ( spending_txid) = output_status. txid {
286
286
if let Some ( spending_tx_status) = output_status. status {
287
- if confirmed_txs. iter ( ) . any ( |ctx| ctx. tx . txid ( ) == spending_txid) {
287
+ if confirmed_txs. iter ( ) . any ( |ctx| ctx. txid == spending_txid) {
288
288
if !spending_tx_status. confirmed {
289
289
log_trace ! ( self . logger, "Inconsistency: Detected previously-confirmed Tx {} as unconfirmed" , spending_txid) ;
290
290
return Err ( InternalError :: Inconsistency ) ;
@@ -341,14 +341,15 @@ where
341
341
// unwrap() safety: len() > 0 is checked above
342
342
let pos = * indexes. first ( ) . unwrap ( ) as usize ;
343
343
if let Some ( tx) = maybe_await ! ( self . client. get_tx( & txid) ) ? {
344
+ let txid = tx. txid ( ) ;
344
345
if let Some ( block_height) = known_block_height {
345
346
// We can take a shortcut here if a previous call already gave us the height.
346
- return Ok ( Some ( ConfirmedTx { tx, block_header, pos, block_height } ) ) ;
347
+ return Ok ( Some ( ConfirmedTx { tx, txid , block_header, pos, block_height } ) ) ;
347
348
}
348
349
349
350
let block_status = maybe_await ! ( self . client. get_block_status( & block_hash) ) ?;
350
351
if let Some ( block_height) = block_status. height {
351
- return Ok ( Some ( ConfirmedTx { tx, block_header, pos, block_height } ) ) ;
352
+ return Ok ( Some ( ConfirmedTx { tx, txid , block_header, pos, block_height } ) ) ;
352
353
} else {
353
354
// If any previously-confirmed block suddenly is no longer confirmed, we found
354
355
// an inconsistency and should start over.
0 commit comments