Add TODOs
authorMatt Corallo <git@bluematt.me>
Mon, 17 Dec 2018 17:13:03 +0000 (12:13 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 3 Feb 2020 02:38:54 +0000 (21:38 -0500)
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs

index 1b2329041fc79256bfdfe356e86d0336ebbefdd7..d8104989b855827a6bd86a356a86d22981529c2e 100644 (file)
@@ -1721,3 +1721,7 @@ fn during_funding_monitor_fail() {
        do_during_funding_monitor_fail(true, true, true, true, false);
        do_during_funding_monitor_fail(true, true, false, false, false);
 }
+
+//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 ed984ab8f62358ce191725013ba68008b4544ea4..80c8de17aca0bd88015529ceb9500a140c6bbb8e 100644 (file)
@@ -2351,6 +2351,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())
                } 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 bcde81dd922b59bde534f0a1506b08924687ffb6..28e8cba400a0d19056a2f26577bfe5f3c3a8b4f8 100644 (file)
@@ -1232,6 +1232,8 @@ impl<ChanSigner: ChannelKeys, M: Deref> ChannelManager<ChanSigner, M> where M::T
        /// If a payment_secret *is* provided, we assume that the invoice had the basic_mpp feature bit
        /// set (either as required or as available).
        pub fn send_payment(&self, route: Route, payment_hash: PaymentHash, payment_secret: Option<&[u8; 32]>) -> 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"}));
                }