pub enum ErrorAction {
    DisconnectPeer {
        msg: Option<ErrorMessage>,
    },
    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.

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.

log_level: Level

The peer may have done something harmless that we weren’t able to meaningfully process, though we should still tell them about it. If this event is logged, log it at the given level.

The peer did something incorrect. Tell them without closing any channels.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.