mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
add missing htlc states from incoming htlcs
This commit is contained in:
parent
0850cbb5bb
commit
0ea7cb2484
@ -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 {}
|
||||
|
@ -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<i32> 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),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user