Add TODOs
authorMatt Corallo <git@bluematt.me>
Mon, 17 Dec 2018 17:13:03 +0000 (12:13 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 25 May 2020 19:36:59 +0000 (15:36 -0400)
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs

index ccd2540575ea5d34092fa69bd612c2868eefeab8..4f5cfa14726d96372d6efd2a0ea06194583ede05 100644 (file)
@@ -1863,3 +1863,7 @@ fn test_path_paused_mpp() {
 
        claim_payment_along_route_with_secret(&nodes[0], &[&[&nodes[1], &nodes[3]], &[&nodes[2], &nodes[3]]], false, payment_preimage, Some(payment_secret), 200_000);
 }
+
+//TODO: Add a test that creates a channel, but in the inbound direction the monitor update fails to
+//persist on funding_signed, but the channelmanager gets persisted, and then when we reload it from
+//disk, we need to make sure the channel gets closed!
index 151564e556dc76bc3da752b4875ce0a3636c76a9..306d4c5954b9cb4a3d89aa7bb373f044e85020d6 100644 (file)
@@ -2493,6 +2493,7 @@ debug_assert!(false, "This should be triggerable, and we should add a test case
                let commitment_update = if self.monitor_pending_commitment_signed {
                        Some(self.get_last_commitment_update(logger))
                } else { None };
+//XXX: Should we free_holding_cell_htlcs() here if we dont need a cs normally?
 
                self.monitor_pending_revoke_and_ack = false;
                self.monitor_pending_commitment_signed = false;
index b5b8d890b787c39d654941fdaf4e7cf3d436309b..0a8eb761e8747526b6c6d80a05884915908c87be 100644 (file)
@@ -1345,6 +1345,8 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
        /// bit set (either as required or as available). If multiple paths are present in the Route,
        /// we assume the invoice had the basic_mpp feature set.
        pub fn send_payment(&self, route: &Route, payment_hash: PaymentHash, payment_secret: &Option<PaymentSecret>) -> Result<(), PaymentSendFailure> {
+// TODO: Check CLTV value is sane cause it may be a timestamp
+// TODO: Send out via future-async-forwardable, not instantly!
                if route.paths.len() < 1 {
                        return Err(PaymentSendFailure::ParameterError(APIError::RouteError{err: "There must be at least one path to send over"}));
                }