X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fblinded_path%2Fmod.rs;h=3dc6b121b006b80f95f05bfb59f23a5ff0764b98;hb=b8d4ac1371bf0db3b28339d4e12fadf02f6add3d;hp=07fa7b770249cae94e1ea18269b63805dc933f93;hpb=d25d55a682dbd4a3c7fcbaa05744fa002e571bca;p=rust-lightning diff --git a/lightning/src/blinded_path/mod.rs b/lightning/src/blinded_path/mod.rs index 07fa7b77..3dc6b121 100644 --- a/lightning/src/blinded_path/mod.rs +++ b/lightning/src/blinded_path/mod.rs @@ -24,6 +24,17 @@ use crate::util::ser::{Readable, Writeable, Writer}; use crate::io; use crate::prelude::*; +/// The next hop to forward an onion message along its path. +/// +/// Note that payment blinded paths always specify their next hop using an explicit node id. +#[derive(Clone, Debug, Hash, PartialEq, Eq)] +pub enum NextMessageHop { + /// The node id of the next hop. + NodeId(PublicKey), + /// The short channel id leading to the next hop. + ShortChannelId(u64), +} + /// Onion messages and payments can be sent and received to blinded paths, which serve to hide the /// identity of the recipient. #[derive(Clone, Debug, Hash, PartialEq, Eq)]