Skip to content

Commit ff32f60

Browse files
committed
Fail PendingInboundPayments after their expiry height is reached
1 parent 6f2a2e2 commit ff32f60

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
@@ -3686,6 +3686,10 @@ where
36863686
});
36873687
!htlcs.is_empty() // Only retain this entry if htlcs has at least one entry.
36883688
});
3689+
let mut payment_secrets = self.pending_inbound_payments.lock().unwrap();
3690+
payment_secrets.retain(|_, inbound_payment| {
3691+
inbound_payment.expiry_height > height
3692+
});
36893693
}
36903694
}
36913695

0 commit comments

Comments
 (0)