+ /// We received an error which indicated only that a node has failed
+ NodeFailure {
+ /// The node_id that has failed.
+ node_id: PublicKey,
+ /// when this true, node should be permanently removed from the
+ /// consideration. Otherwise, the channels connected to this node can be
+ /// restored as new channel_update is received
+ is_permanent: bool,
+ }
+}
+
+/// For events which result in both a RevokeAndACK and a CommitmentUpdate, by default they should
+/// be sent in the order they appear in the return value, however sometimes the order needs to be
+/// variable at runtime (eg handle_channel_reestablish needs to re-send messages in the order they
+/// were originally sent). In those cases, this enum is also returned.
+#[derive(Clone, PartialEq)]
+pub enum RAACommitmentOrder {
+ /// Send the CommitmentUpdate messages first
+ CommitmentFirst,
+ /// Send the RevokeAndACK message first
+ RevokeAndACKFirst,