@@ -1100,6 +1100,7 @@ impl<'a> CandidateRouteHop<'a> {
1100
1100
///
1101
1101
/// Note that this is deliberately not public as it is somewhat of a footgun because it doesn't
1102
1102
/// define a global namespace.
1103
+ #[ inline]
1103
1104
fn short_channel_id ( & self ) -> Option < u64 > {
1104
1105
match self {
1105
1106
CandidateRouteHop :: FirstHop { details, .. } => details. get_outbound_payment_scid ( ) ,
@@ -1115,6 +1116,7 @@ impl<'a> CandidateRouteHop<'a> {
1115
1116
/// This only returns `Some` if the channel is public (either our own, or one we've learned
1116
1117
/// from the public network graph), and thus the short channel ID we have for this channel is
1117
1118
/// globally unique and identifies this channel in a global namespace.
1119
+ #[ inline]
1118
1120
pub fn globally_unique_short_channel_id ( & self ) -> Option < u64 > {
1119
1121
match self {
1120
1122
CandidateRouteHop :: FirstHop { details, .. } => if details. is_public { details. short_channel_id } else { None } ,
@@ -1137,6 +1139,7 @@ impl<'a> CandidateRouteHop<'a> {
1137
1139
}
1138
1140
1139
1141
/// Returns cltv_expiry_delta for this hop.
1142
+ #[ inline]
1140
1143
pub fn cltv_expiry_delta ( & self ) -> u32 {
1141
1144
match self {
1142
1145
CandidateRouteHop :: FirstHop { .. } => 0 ,
@@ -1148,6 +1151,7 @@ impl<'a> CandidateRouteHop<'a> {
1148
1151
}
1149
1152
1150
1153
/// Returns the htlc_minimum_msat for this hop.
1154
+ #[ inline]
1151
1155
pub fn htlc_minimum_msat ( & self ) -> u64 {
1152
1156
match self {
1153
1157
CandidateRouteHop :: FirstHop { details, .. } => details. next_outbound_htlc_minimum_msat ,
@@ -1159,6 +1163,7 @@ impl<'a> CandidateRouteHop<'a> {
1159
1163
}
1160
1164
1161
1165
/// Returns the fees for this hop.
1166
+ #[ inline]
1162
1167
pub fn fees ( & self ) -> RoutingFees {
1163
1168
match self {
1164
1169
CandidateRouteHop :: FirstHop { .. } => RoutingFees {
@@ -1196,6 +1201,7 @@ impl<'a> CandidateRouteHop<'a> {
1196
1201
/// Returns an ID describing the given hop.
1197
1202
///
1198
1203
/// See the docs on [`CandidateHopId`] for when this is, or is not, unique.
1204
+ #[ inline]
1199
1205
fn id ( & self ) -> CandidateHopId {
1200
1206
match self {
1201
1207
CandidateRouteHop :: Blinded { hint_idx, .. } => CandidateHopId :: Blinded ( * hint_idx) ,
@@ -1216,6 +1222,7 @@ impl<'a> CandidateRouteHop<'a> {
1216
1222
/// Source node id refers to the hop forwarding the payment.
1217
1223
///
1218
1224
/// For `FirstHop` we return payer's node id.
1225
+ #[ inline]
1219
1226
pub fn source ( & self ) -> NodeId {
1220
1227
match self {
1221
1228
CandidateRouteHop :: FirstHop { node_id, .. } => * node_id,
@@ -1230,7 +1237,8 @@ impl<'a> CandidateRouteHop<'a> {
1230
1237
/// Target node id refers to the hop receiving the payment.
1231
1238
///
1232
1239
/// For `Blinded` and `OneHopBlinded` we return `None` because next hop is blinded.
1233
- pub fn target ( & self ) -> Option < NodeId > {
1240
+ #[ inline]
1241
+ pub fn target ( & self ) -> Option < NodeId > {
1234
1242
match self {
1235
1243
CandidateRouteHop :: FirstHop { details, .. } => Some ( details. counterparty . node_id . into ( ) ) ,
1236
1244
CandidateRouteHop :: PublicHop { info, .. } => Some ( * info. target ( ) ) ,
0 commit comments