Enum lightning::util::events::MessageSendEvent[][src]

pub enum MessageSendEvent {
Show variants SendAcceptChannel { node_id: PublicKey, msg: AcceptChannel, }, SendOpenChannel { node_id: PublicKey, msg: OpenChannel, }, SendFundingCreated { node_id: PublicKey, msg: FundingCreated, }, SendFundingSigned { node_id: PublicKey, msg: FundingSigned, }, SendFundingLocked { node_id: PublicKey, msg: FundingLocked, }, SendAnnouncementSignatures { node_id: PublicKey, msg: AnnouncementSignatures, }, UpdateHTLCs { node_id: PublicKey, updates: CommitmentUpdate, }, SendRevokeAndACK { node_id: PublicKey, msg: RevokeAndACK, }, SendClosingSigned { node_id: PublicKey, msg: ClosingSigned, }, SendShutdown { node_id: PublicKey, msg: Shutdown, }, SendChannelReestablish { node_id: PublicKey, msg: ChannelReestablish, }, BroadcastChannelAnnouncement { msg: ChannelAnnouncement, update_msg: ChannelUpdate, }, BroadcastNodeAnnouncement { msg: NodeAnnouncement, }, BroadcastChannelUpdate { msg: ChannelUpdate, }, HandleError { node_id: PublicKey, action: ErrorAction, }, PaymentFailureNetworkUpdate { update: HTLCFailChannelUpdate, }, SendChannelRangeQuery { node_id: PublicKey, msg: QueryChannelRange, }, SendShortIdsQuery { node_id: PublicKey, msg: QueryShortChannelIds, }, SendReplyChannelRange { node_id: PublicKey, msg: ReplyChannelRange, },
}
Expand description

An event generated by ChannelManager which indicates a message should be sent to a peer (or broadcast to most peers). These events are handled by PeerManager::process_events if you are using a PeerManager.

Variants

SendAcceptChannel

Used to indicate that we’ve accepted a channel open and should send the accept_channel message provided to the given peer.

Show fields

Fields of SendAcceptChannel

node_id: PublicKey

The node_id of the node which should receive this message

msg: AcceptChannel

The message which should be sent.

SendOpenChannel

Used to indicate that we’ve initiated a channel open and should send the open_channel message provided to the given peer.

Show fields

Fields of SendOpenChannel

node_id: PublicKey

The node_id of the node which should receive this message

msg: OpenChannel

The message which should be sent.

SendFundingCreated

Used to indicate that a funding_created message should be sent to the peer with the given node_id.

Show fields

Fields of SendFundingCreated

node_id: PublicKey

The node_id of the node which should receive this message

msg: FundingCreated

The message which should be sent.

SendFundingSigned

Used to indicate that a funding_signed message should be sent to the peer with the given node_id.

Show fields

Fields of SendFundingSigned

node_id: PublicKey

The node_id of the node which should receive this message

msg: FundingSigned

The message which should be sent.

SendFundingLocked

Used to indicate that a funding_locked message should be sent to the peer with the given node_id.

Show fields

Fields of SendFundingLocked

node_id: PublicKey

The node_id of the node which should receive these message(s)

msg: FundingLocked

The funding_locked message which should be sent.

SendAnnouncementSignatures

Used to indicate that an announcement_signatures message should be sent to the peer with the given node_id.

Show fields

Fields of SendAnnouncementSignatures

node_id: PublicKey

The node_id of the node which should receive these message(s)

msg: AnnouncementSignatures

The announcement_signatures message which should be sent.

UpdateHTLCs

Used to indicate that a series of HTLC update messages, as well as a commitment_signed message should be sent to the peer with the given node_id.

Show fields

Fields of UpdateHTLCs

node_id: PublicKey

The node_id of the node which should receive these message(s)

updates: CommitmentUpdate

The update messages which should be sent. ALL messages in the struct should be sent!

SendRevokeAndACK

Used to indicate that a revoke_and_ack message should be sent to the peer with the given node_id.

Show fields

Fields of SendRevokeAndACK

node_id: PublicKey

The node_id of the node which should receive this message

msg: RevokeAndACK

The message which should be sent.

SendClosingSigned

Used to indicate that a closing_signed message should be sent to the peer with the given node_id.

Show fields

Fields of SendClosingSigned

node_id: PublicKey

The node_id of the node which should receive this message

msg: ClosingSigned

The message which should be sent.

SendShutdown

Used to indicate that a shutdown message should be sent to the peer with the given node_id.

Show fields

Fields of SendShutdown

node_id: PublicKey

The node_id of the node which should receive this message

msg: Shutdown

The message which should be sent.

SendChannelReestablish

Used to indicate that a channel_reestablish message should be sent to the peer with the given node_id.

Show fields

Fields of SendChannelReestablish

node_id: PublicKey

The node_id of the node which should receive this message

msg: ChannelReestablish

The message which should be sent.

BroadcastChannelAnnouncement

Used to indicate that a channel_announcement and channel_update should be broadcast to all peers (except the peer with node_id either msg.contents.node_id_1 or msg.contents.node_id_2).

Note that after doing so, you very likely (unless you did so very recently) want to call ChannelManager::broadcast_node_announcement to trigger a BroadcastNodeAnnouncement event. This ensures that any nodes which see our channel_announcement also have a relevant node_announcement, including relevant feature flags which may be important for routing through or to us.

Show fields

Fields of BroadcastChannelAnnouncement

msg: ChannelAnnouncement

The channel_announcement which should be sent.

update_msg: ChannelUpdate

The followup channel_update which should be sent.

BroadcastNodeAnnouncement

Used to indicate that a node_announcement should be broadcast to all peers.

Show fields

Fields of BroadcastNodeAnnouncement

msg: NodeAnnouncement

The node_announcement which should be sent.

BroadcastChannelUpdate

Used to indicate that a channel_update should be broadcast to all peers.

Show fields

Fields of BroadcastChannelUpdate

msg: ChannelUpdate

The channel_update which should be sent.

HandleError

Broadcast an error downstream to be handled

Show fields

Fields of HandleError

node_id: PublicKey

The node_id of the node which should receive this message

action: ErrorAction

The action which should be taken.

PaymentFailureNetworkUpdate

When a payment fails we may receive updates back from the hop where it failed. In such cases this event is generated so that we can inform the network graph of this information.

Show fields

Fields of PaymentFailureNetworkUpdate

update: HTLCFailChannelUpdate

The channel/node update which should be sent to NetGraphMsgHandler

SendChannelRangeQuery

Query a peer for channels with funding transaction UTXOs in a block range.

Show fields

Fields of SendChannelRangeQuery

node_id: PublicKey

The node_id of this message recipient

msg: QueryChannelRange

The query_channel_range which should be sent.

SendShortIdsQuery

Request routing gossip messages from a peer for a list of channels identified by their short_channel_ids.

Show fields

Fields of SendShortIdsQuery

node_id: PublicKey

The node_id of this message recipient

msg: QueryShortChannelIds

The query_short_channel_ids which should be sent.

SendReplyChannelRange

Sends a reply to a channel range query. This may be one of several SendReplyChannelRange events emitted during processing of the query.

Show fields

Fields of SendReplyChannelRange

node_id: PublicKey

The node_id of this message recipient

msg: ReplyChannelRange

The reply_channel_range which should be sent.

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

Performs the conversion.

Performs the conversion.

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)

recently added

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.