Enum lightning::ln::msgs::ErrorAction
source · pub enum ErrorAction {
DisconnectPeer {
msg: Option<ErrorMessage>,
},
DisconnectPeerWithWarning {
msg: WarningMessage,
},
IgnoreError,
IgnoreAndLog(Level),
IgnoreDuplicateGossip,
SendErrorMessage {
msg: ErrorMessage,
},
SendWarningMessage {
msg: WarningMessage,
log_level: Level,
},
}
Expand description
Used to put an error message in a LightningError
.
Variants§
DisconnectPeer
Fields
msg: Option<ErrorMessage>
An error message which we should make an effort to send before we disconnect.
The peer took some action which made us think they were useless. Disconnect them.
DisconnectPeerWithWarning
Fields
msg: WarningMessage
A warning message which we should make an effort to send before we disconnect.
The peer did something incorrect. Tell them without closing any channels and disconnect them.
IgnoreError
The peer did something harmless that we weren’t able to process, just log and ignore
IgnoreAndLog(Level)
The peer did something harmless that we weren’t able to meaningfully process. If the error is logged, log it at the given level.
IgnoreDuplicateGossip
The peer provided us with a gossip message which we’d already seen. In most cases this should be ignored, but it may result in the message being forwarded if it is a duplicate of our own channel announcements.
SendErrorMessage
Fields
msg: ErrorMessage
The message to send.
The peer did something incorrect. Tell them.
SendWarningMessage
Fields
msg: WarningMessage
The message to send.
The peer did something incorrect. Tell them without closing any channels.
Trait Implementations§
source§impl Clone for ErrorAction
impl Clone for ErrorAction
source§fn clone(&self) -> ErrorAction
fn clone(&self) -> ErrorAction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ErrorAction
impl Debug for ErrorAction
source§impl Hash for ErrorAction
impl Hash for ErrorAction
source§impl PartialEq for ErrorAction
impl PartialEq for ErrorAction
source§fn eq(&self, other: &ErrorAction) -> bool
fn eq(&self, other: &ErrorAction) -> bool
self
and other
values to be equal, and is used
by ==
.