pub enum MessageSendEvent {
Show 20 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,
},
SendChannelReady {
node_id: PublicKey,
msg: ChannelReady,
},
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,
},
SendChannelAnnouncement {
node_id: PublicKey,
msg: ChannelAnnouncement,
update_msg: ChannelUpdate,
},
BroadcastChannelAnnouncement {
msg: ChannelAnnouncement,
update_msg: ChannelUpdate,
},
BroadcastChannelUpdate {
msg: ChannelUpdate,
},
SendChannelUpdate {
node_id: PublicKey,
msg: ChannelUpdate,
},
HandleError {
node_id: PublicKey,
action: ErrorAction,
},
SendChannelRangeQuery {
node_id: PublicKey,
msg: QueryChannelRange,
},
SendShortIdsQuery {
node_id: PublicKey,
msg: QueryShortChannelIds,
},
SendReplyChannelRange {
node_id: PublicKey,
msg: ReplyChannelRange,
},
SendGossipTimestampFilter {
node_id: PublicKey,
msg: GossipTimestampFilter,
},
}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.
Fields
msg: AcceptChannelThe 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.
Fields
msg: OpenChannelThe 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.
Fields
msg: FundingCreatedThe 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.
Fields
msg: FundingSignedThe message which should be sent.
SendChannelReady
Used to indicate that a channel_ready message should be sent to the peer with the given node_id.
Fields
msg: ChannelReadyThe channel_ready 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.
Fields
msg: AnnouncementSignaturesThe 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.
Fields
updates: CommitmentUpdateThe 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.
Fields
msg: RevokeAndACKThe 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.
Fields
msg: ClosingSignedThe message which should be sent.
SendShutdown
Used to indicate that a shutdown message should be sent to the peer with the given node_id.
Fields
SendChannelReestablish
Used to indicate that a channel_reestablish message should be sent to the peer with the given node_id.
Fields
msg: ChannelReestablishThe message which should be sent.
SendChannelAnnouncement
Used to send a channel_announcement and channel_update to a specific peer, likely on initial connection to ensure our peers know about our channels.
Fields
msg: ChannelAnnouncementThe channel_announcement which should be sent.
update_msg: ChannelUpdateThe followup channel_update 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
broadcast a node_announcement (e.g. via PeerManager::broadcast_node_announcement). 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.
Fields
msg: ChannelAnnouncementThe channel_announcement which should be sent.
update_msg: ChannelUpdateThe followup channel_update which should be sent.
BroadcastChannelUpdate
Used to indicate that a channel_update should be broadcast to all peers.
Fields
msg: ChannelUpdateThe channel_update which should be sent.
SendChannelUpdate
Used to indicate that a channel_update should be sent to a single peer.
In contrast to Self::BroadcastChannelUpdate, this is used when the channel is a
private channel and we shouldn’t be informing all of our peers of channel parameters.
Fields
msg: ChannelUpdateThe channel_update which should be sent.
HandleError
Broadcast an error downstream to be handled
Fields
action: ErrorActionThe action which should be taken.
SendChannelRangeQuery
Query a peer for channels with funding transaction UTXOs in a block range.
Fields
msg: QueryChannelRangeThe 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.
Fields
msg: QueryShortChannelIdsThe 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.
Fields
msg: ReplyChannelRangeThe reply_channel_range which should be sent.
SendGossipTimestampFilter
Sends a timestamp filter for inbound gossip. This should be sent on each new connection to enable receiving gossip messages from the peer.
Fields
msg: GossipTimestampFilterThe gossip_timestamp_filter which should be sent.
Trait Implementations§
Source§impl Clone for MessageSendEvent
impl Clone for MessageSendEvent
Source§fn clone(&self) -> MessageSendEvent
fn clone(&self) -> MessageSendEvent
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more