Skip to content

Commit c4e6037

Browse files
committed
Fail PendingInboundPayments after their expiry height is reached
1 parent 8f11e87 commit c4e6037

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3685,6 +3685,10 @@ where
36853685
});
36863686
!htlcs.is_empty() // Only retain this entry if htlcs has at least one entry.
36873687
});
3688+
let mut payment_secrets = self.pending_inbound_payments.lock().unwrap();
3689+
payment_secrets.retain(|_, inbound_payment| {
3690+
inbound_payment.expiry_height > height
3691+
});
36883692
}
36893693
}
36903694

0 commit comments

Comments
 (0)