File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1043,6 +1043,16 @@ impl<'a> DirectedChannelInfo<'a> {
1043
1043
/// Returns information for the direction.
1044
1044
#[ inline]
1045
1045
pub ( super ) fn direction ( & self ) -> & ' a ChannelUpdateInfo { self . direction }
1046
+
1047
+ /// Returns the `node_id` of the source hop.
1048
+ ///
1049
+ /// Refers to the `node_id` forwarding the payment to the next hop.
1050
+ pub ( super ) fn source ( & self ) -> & ' a NodeId { if self . outbound { & self . channel . node_one } else { & self . channel . node_two } }
1051
+
1052
+ /// Returns the `node_id` of the target hop.
1053
+ ///
1054
+ /// Refers to the `node_id` receiving the payment from the previous hop.
1055
+ pub ( super ) fn target ( & self ) -> & ' a NodeId { if self . outbound { & self . channel . node_two } else { & self . channel . node_one } }
1046
1056
}
1047
1057
1048
1058
impl < ' a > fmt:: Debug for DirectedChannelInfo < ' a > {
You can’t perform that action at this time.
0 commit comments