Emit pong channel status event, and in status metrics

This commit is contained in:
Dominik Werder
2024-07-24 21:50:28 +02:00
parent 85db531133
commit 62b3628003
4 changed files with 152 additions and 185 deletions
+3
View File
@@ -470,6 +470,7 @@ pub enum ChannelStatus {
AssignedToAddress,
Opened,
Closed(ChannelStatusClosedReason),
Pong,
}
impl ChannelStatus {
@@ -492,6 +493,7 @@ impl ChannelStatus {
ConnectFail => 11,
IoError => 12,
},
Pong => 25,
}
}
@@ -512,6 +514,7 @@ impl ChannelStatus {
11 => Closed(ConnectFail),
12 => Closed(IoError),
24 => AssignedToAddress,
25 => Pong,
_ => {
return Err(err::Error::with_msg_no_trace(format!(
"unknown ChannelStatus kind {kind}"