Merge pull request #2957 from G8XSU/pause-events
[rust-lightning] / lightning / src / blinded_path / mod.rs
index 07fa7b770249cae94e1ea18269b63805dc933f93..3dc6b121b006b80f95f05bfb59f23a5ff0764b98 100644 (file)
@@ -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)]