@@ -22,7 +22,7 @@ use crate::ln::msgs::{DecodeError, ErrorAction, LightningError, MAX_VALUE_MSAT};
22
22
use crate :: ln:: onion_utils;
23
23
use crate :: offers:: invoice:: { BlindedPayInfo , Bolt12Invoice } ;
24
24
use crate :: onion_message:: messenger:: { DefaultMessageRouter , Destination , MessageRouter , OnionMessagePath } ;
25
- use crate :: routing:: gossip:: { DirectedChannelInfo , EffectiveCapacity , ReadOnlyNetworkGraph , NetworkGraph , NodeId , RoutingFees } ;
25
+ use crate :: routing:: gossip:: { DirectedChannelInfo , EffectiveCapacity , ReadOnlyNetworkGraph , NetworkGraph , NodeId } ;
26
26
use crate :: routing:: scoring:: { ChannelUsage , LockableScore , ScoreLookUp } ;
27
27
use crate :: sign:: EntropySource ;
28
28
use crate :: util:: ser:: { Writeable , Readable , ReadableArgs , Writer } ;
@@ -35,6 +35,10 @@ use alloc::collections::BinaryHeap;
35
35
use core:: { cmp, fmt} ;
36
36
use core:: ops:: Deref ;
37
37
38
+ use lightning_types:: routing:: RoutingFees ;
39
+
40
+ pub use lightning_types:: routing:: { RouteHint , RouteHintHop } ;
41
+
38
42
/// A [`Router`] implemented using [`find_route`].
39
43
///
40
44
/// # Privacy
@@ -1099,10 +1103,6 @@ impl ReadableArgs<bool> for Features {
1099
1103
}
1100
1104
}
1101
1105
1102
- /// A list of hops along a payment path terminating with a channel to the recipient.
1103
- #[ derive( Clone , Debug , Hash , Eq , PartialEq , Ord , PartialOrd ) ]
1104
- pub struct RouteHint ( pub Vec < RouteHintHop > ) ;
1105
-
1106
1106
impl Writeable for RouteHint {
1107
1107
fn write < W : crate :: util:: ser:: Writer > ( & self , writer : & mut W ) -> Result < ( ) , io:: Error > {
1108
1108
( self . 0 . len ( ) as u64 ) . write ( writer) ?;
@@ -1124,27 +1124,6 @@ impl Readable for RouteHint {
1124
1124
}
1125
1125
}
1126
1126
1127
- /// A channel descriptor for a hop along a payment path.
1128
- ///
1129
- /// While this generally comes from BOLT 11's `r` field, this struct includes more fields than are
1130
- /// available in BOLT 11. Thus, encoding and decoding this via `lightning-invoice` is lossy, as
1131
- /// fields not supported in BOLT 11 will be stripped.
1132
- #[ derive( Clone , Debug , Hash , Eq , PartialEq , Ord , PartialOrd ) ]
1133
- pub struct RouteHintHop {
1134
- /// The node_id of the non-target end of the route
1135
- pub src_node_id : PublicKey ,
1136
- /// The short_channel_id of this channel
1137
- pub short_channel_id : u64 ,
1138
- /// The fees which must be paid to use this channel
1139
- pub fees : RoutingFees ,
1140
- /// The difference in CLTV values between this node and the next node.
1141
- pub cltv_expiry_delta : u16 ,
1142
- /// The minimum value, in msat, which must be relayed to the next hop.
1143
- pub htlc_minimum_msat : Option < u64 > ,
1144
- /// The maximum value in msat available for routing with a single HTLC.
1145
- pub htlc_maximum_msat : Option < u64 > ,
1146
- }
1147
-
1148
1127
impl_writeable_tlv_based ! ( RouteHintHop , {
1149
1128
( 0 , src_node_id, required) ,
1150
1129
( 1 , htlc_minimum_msat, option) ,
0 commit comments