Merge pull request #892 from TheBlueMatt/2021-04-fix-htlc-ser
[rust-lightning] / lightning / src / ln / channel.rs
index 1c1b85ca1727aa90e9902b8130230571a28cc7cf..40b73c3bd5f526c87e4ffc8d5a62a19456a4b80a 100644 (file)
@@ -4519,9 +4519,10 @@ impl<Signer: Sign> Writeable for Channel<Signer> {
                                &OutboundHTLCState::Committed => {
                                        1u8.write(writer)?;
                                },
-                               &OutboundHTLCState::RemoteRemoved(ref fail_reason) => {
-                                       2u8.write(writer)?;
-                                       fail_reason.write(writer)?;
+                               &OutboundHTLCState::RemoteRemoved(_) => {
+                                       // Treat this as a Committed because we haven't received the CS - they'll
+                                       // resend the claim/fail on reconnect as we all (hopefully) the missing CS.
+                                       1u8.write(writer)?;
                                },
                                &OutboundHTLCState::AwaitingRemoteRevokeToRemove(ref fail_reason) => {
                                        3u8.write(writer)?;