Skip to content

Commit 1c86efe

Browse files
committed
Fail PendingInboundPayments after their expiry height is reached
1 parent 15526ec commit 1c86efe

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
@@ -3689,6 +3689,10 @@ where
36893689
});
36903690
!htlcs.is_empty() // Only retain this entry if htlcs has at least one entry.
36913691
});
3692+
let mut payment_secrets = self.pending_inbound_payments.lock().unwrap();
3693+
payment_secrets.retain(|_, inbound_payment| {
3694+
inbound_payment.expiry_height > height
3695+
});
36923696
}
36933697
}
36943698

0 commit comments

Comments
 (0)