X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fevents.rs;h=6f6f32daeab18226313872d1b5ae15fbd3bfa038;hb=d183b975da73c40c513feca92e09f8295b70b13f;hp=60191b886d59222bf7b2310e2f80264942cce70c;hpb=864017368926a255dd60bc1af42a5b848b89e1b7;p=rust-lightning diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 60191b88..6f6f32da 100644 --- a/lightning/src/util/events.rs +++ b/lightning/src/util/events.rs @@ -31,7 +31,7 @@ use std::time::Duration; /// Note that while Writeable and Readable are implemented for Event, you probably shouldn't use /// them directly as they don't round-trip exactly (for example FundingGenerationReady is never /// written as it makes no sense to respond to it after reconnecting to peers). -#[derive(Debug)] +#[derive(Clone, Debug)] pub enum Event { /// Used to indicate that the client should generate a funding transaction with the given /// parameters and then call ChannelManager::funding_transaction_generated. @@ -346,7 +346,22 @@ pub enum MessageSendEvent { PaymentFailureNetworkUpdate { /// The channel/node update which should be sent to NetGraphMsgHandler update: msgs::HTLCFailChannelUpdate, - } + }, + /// Query a peer for channels with funding transaction UTXOs in a block range. + SendChannelRangeQuery { + /// The node_id of this message recipient + node_id: PublicKey, + /// The query_channel_range which should be sent. + msg: msgs::QueryChannelRange, + }, + /// Request routing gossip messages from a peer for a list of channels identified by + /// their short_channel_ids. + SendShortIdsQuery { + /// The node_id of this message recipient + node_id: PublicKey, + /// The query_short_channel_ids which should be sent. + msg: msgs::QueryShortChannelIds, + }, } /// A trait indicating an object may generate message send events