@@ -2197,7 +2197,7 @@ impl PendingSplice {
2197
2197
{
2198
2198
debug_assert!(confirmed_funding_index < self.pending_funding.len());
2199
2199
2200
- let funding = self.pending_funding.get( confirmed_funding_index).unwrap() ;
2200
+ let funding = & self.pending_funding[ confirmed_funding_index] ;
2201
2201
if !context.check_funding_meets_minimum_depth(funding, height) {
2202
2202
return None;
2203
2203
}
@@ -9553,7 +9553,7 @@ where
9553
9553
&self.context.channel_id,
9554
9554
);
9555
9555
9556
- let funding = pending_splice.pending_funding.get_mut( confirmed_funding_index).unwrap() ;
9556
+ let funding = &mut pending_splice.pending_funding[ confirmed_funding_index] ;
9557
9557
debug_assert_eq!(Some(splice_txid), funding.get_funding_txid());
9558
9558
promote_splice_funding!(self, funding);
9559
9559
@@ -9663,7 +9663,7 @@ where
9663
9663
) {
9664
9664
for &(idx, tx) in txdata.iter() {
9665
9665
if idx > index_in_block {
9666
- let funding = pending_splice.pending_funding.get( confirmed_funding_index).unwrap() ;
9666
+ let funding = & pending_splice.pending_funding[ confirmed_funding_index] ;
9667
9667
self.context.check_for_funding_tx_spent(funding, tx, logger)?;
9668
9668
}
9669
9669
}
@@ -9822,7 +9822,7 @@ where
9822
9822
return Err(ClosureReason::ProcessingError { err });
9823
9823
},
9824
9824
};
9825
- let funding = pending_splice.pending_funding.get_mut( confirmed_funding_index).unwrap() ;
9825
+ let funding = &mut pending_splice.pending_funding[ confirmed_funding_index] ;
9826
9826
9827
9827
// Check if the splice funding transaction was unconfirmed
9828
9828
if funding.get_funding_tx_confirmations(height) == 0 {
0 commit comments