Skip to content

Commit b26e282

Browse files
committed
f - index notation
1 parent a317442 commit b26e282

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/ln/channel.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,7 +2197,7 @@ impl PendingSplice {
21972197
{
21982198
debug_assert!(confirmed_funding_index < self.pending_funding.len());
21992199

2200-
let funding = self.pending_funding.get(confirmed_funding_index).unwrap();
2200+
let funding = &self.pending_funding[confirmed_funding_index];
22012201
if !context.check_funding_meets_minimum_depth(funding, height) {
22022202
return None;
22032203
}
@@ -9553,7 +9553,7 @@ where
95539553
&self.context.channel_id,
95549554
);
95559555

9556-
let funding = pending_splice.pending_funding.get_mut(confirmed_funding_index).unwrap();
9556+
let funding = &mut pending_splice.pending_funding[confirmed_funding_index];
95579557
debug_assert_eq!(Some(splice_txid), funding.get_funding_txid());
95589558
promote_splice_funding!(self, funding);
95599559

@@ -9663,7 +9663,7 @@ where
96639663
) {
96649664
for &(idx, tx) in txdata.iter() {
96659665
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];
96679667
self.context.check_for_funding_tx_spent(funding, tx, logger)?;
96689668
}
96699669
}
@@ -9822,7 +9822,7 @@ where
98229822
return Err(ClosureReason::ProcessingError { err });
98239823
},
98249824
};
9825-
let funding = pending_splice.pending_funding.get_mut(confirmed_funding_index).unwrap();
9825+
let funding = &mut pending_splice.pending_funding[confirmed_funding_index];
98269826

98279827
// Check if the splice funding transaction was unconfirmed
98289828
if funding.get_funding_tx_confirmations(height) == 0 {

0 commit comments

Comments
 (0)