X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Futil%2Fevents.rs;h=589c4be10e61b331e6443ef4514a66e6d754af80;hb=4330ae5d4f1fefeb7f211360354fb04eb8480351;hp=c2c3ab6a1a71c0ce813dce3eb500e5a94fe53977;hpb=7b4f382e26368be7f010a081e553803b98eb9550;p=rust-lightning diff --git a/src/util/events.rs b/src/util/events.rs index c2c3ab6a..589c4be1 100644 --- a/src/util/events.rs +++ b/src/util/events.rs @@ -46,13 +46,13 @@ pub enum Event { PaymentFailed { payment_hash: [u8; 32], }, - - // Events indicating the network loop should send a message to a peer: /// Used to indicate that ChannelManager::process_pending_htlc_forwards should be called at a /// time in the future. PendingHTLCsForwardable { time_forwardable: Instant, }, + + // Events indicating the network loop should send a message to a peer: /// Used to indicate that we've initialted a channel open and should send the open_channel /// message provided to the given peer SendOpenChannel { @@ -104,6 +104,13 @@ pub enum Event { BroadcastChannelUpdate { msg: msgs::ChannelUpdate, }, + + //Error handling + /// Broadcast an error downstream to be handled + HandleError { + node_id: PublicKey, + action: Option + } } pub trait EventsProvider {