@@ -130,22 +130,23 @@ impl PayjoinSender {
130130 ) {
131131 let ( index, tx) = txdata[ 0 ] ;
132132 let txid = tx. txid ( ) ;
133- let mut transactions = self . transactions . lock ( ) . unwrap ( ) ;
134- let position = transactions. iter ( ) . position ( |o| o. txid ( ) == Some ( txid) ) . unwrap ( ) ;
135- let pj_tx = transactions. remove ( position) ;
133+ let position = self . transactions . lock ( ) . unwrap ( ) . iter ( ) . position ( |o| o. txid ( ) == Some ( txid) ) . unwrap ( ) ;
134+ let pj_tx = self . transactions . lock ( ) . unwrap ( ) . remove ( position) ;
136135 dbg ! ( "found confirmed" , & pj_tx) ;
137136 let pj_tx = match pj_tx {
138137 PayjoinTransaction :: PendingFirstConfirmation {
139138 ref tx,
140139 first_broadcast_height,
141140 first_broadcast_hash,
142- } => transactions. push ( PayjoinTransaction :: PendingThresholdConfirmations {
141+ } => {
142+ dbg ! ( "Here in peding first confirmation" ) ;
143+ self . transactions . lock ( ) . unwrap ( ) . push ( PayjoinTransaction :: PendingThresholdConfirmations {
143144 tx : tx. clone ( ) ,
144145 first_broadcast_height,
145146 first_broadcast_hash,
146147 latest_confirmation_height : height,
147148 latest_confirmation_hash : header. block_hash ( ) ,
148- } ) ,
149+ } ) } ,
149150 PayjoinTransaction :: PendingThresholdConfirmations {
150151 ref tx,
151152 first_broadcast_height,
@@ -159,7 +160,7 @@ impl PayjoinSender {
159160 if height - first_broadcast_height >= ANTI_REORG_DELAY {
160161 let _ = self . event_queue . add_event ( Event :: PayjoinTxSendSuccess { txid } ) ;
161162 } else {
162- transactions. push ( PayjoinTransaction :: PendingThresholdConfirmations {
163+ self . transactions . lock ( ) . unwrap ( ) . push ( PayjoinTransaction :: PendingThresholdConfirmations {
163164 tx : tx. clone ( ) ,
164165 first_broadcast_height,
165166 first_broadcast_hash,
0 commit comments