From 0ea7cb2484f4ddc642c053a3fc5177de796a915f Mon Sep 17 00:00:00 2001 From: daywalker90 Date: Sun, 14 May 2023 19:02:55 +0200 Subject: [PATCH] add missing htlc states from incoming htlcs --- cln-grpc/proto/primitives.proto | 9 +++++++++ cln-rpc/src/primitives.rs | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/cln-grpc/proto/primitives.proto b/cln-grpc/proto/primitives.proto index e60999a13..44ae147be 100644 --- a/cln-grpc/proto/primitives.proto +++ b/cln-grpc/proto/primitives.proto @@ -50,6 +50,15 @@ enum HtlcState { SentRemoveRevocation = 8; SentRemoveAckCommit = 9; RcvdRemoveAckRevocation = 10; + RCVD_ADD_HTLC = 11, + RCVD_ADD_COMMIT = 12, + SENT_ADD_REVOCATION = 13, + SENT_ADD_ACK_COMMIT = 14, + SENT_REMOVE_HTLC = 15, + SENT_REMOVE_COMMIT = 16, + RCVD_REMOVE_REVOCATION = 17, + RCVD_REMOVE_ACK_COMMIT = 18, + SENT_REMOVE_ACK_REVOCATION = 19, } message ChannelStateChangeCause {} diff --git a/cln-rpc/src/primitives.rs b/cln-rpc/src/primitives.rs index 064c56208..1d8058cd6 100644 --- a/cln-rpc/src/primitives.rs +++ b/cln-rpc/src/primitives.rs @@ -40,6 +40,15 @@ pub enum HtlcState { SENT_REMOVE_REVOCATION = 8, SENT_REMOVE_ACK_COMMIT = 9, RCVD_REMOVE_ACK_REVOCATION = 10, + RCVD_ADD_HTLC = 11, + RCVD_ADD_COMMIT = 12, + SENT_ADD_REVOCATION = 13, + SENT_ADD_ACK_COMMIT = 14, + SENT_REMOVE_HTLC = 15, + SENT_REMOVE_COMMIT = 16, + RCVD_REMOVE_REVOCATION = 17, + RCVD_REMOVE_ACK_COMMIT = 18, + SENT_REMOVE_ACK_REVOCATION = 19, } #[derive(Copy, Clone, Serialize, Deserialize, Debug)] @@ -319,6 +328,16 @@ impl From for HtlcState { 8 => HtlcState::SENT_REMOVE_REVOCATION, 9 => HtlcState::SENT_REMOVE_ACK_COMMIT, 10 => HtlcState::RCVD_REMOVE_ACK_REVOCATION, + 11 => HtlcState::RCVD_ADD_HTLC, + 12 => HtlcState::RCVD_ADD_COMMIT, + 13 => HtlcState::SENT_ADD_REVOCATION, + 14 => HtlcState::SENT_ADD_ACK_COMMIT, + 15 => HtlcState::SENT_REMOVE_HTLC, + 16 => HtlcState::SENT_REMOVE_COMMIT, + 17 => HtlcState::RCVD_REMOVE_REVOCATION, + 18 => HtlcState::RCVD_REMOVE_ACK_COMMIT, + 19 => HtlcState::SENT_REMOVE_ACK_REVOCATION, + n => panic!("Unmapped HtlcState variant: {}", n), } }