File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ use crate::ln::features::BlindedHopFeatures;
13
13
use crate :: ln:: msgs:: DecodeError ;
14
14
use crate :: offers:: invoice:: BlindedPayInfo ;
15
15
use crate :: prelude:: * ;
16
+ use crate :: routing:: gossip:: DirectedChannelInfo ;
16
17
use crate :: util:: ser:: { Readable , Writeable , Writer } ;
17
18
18
19
use core:: convert:: TryFrom ;
@@ -106,6 +107,17 @@ impl From<CounterpartyForwardingInfo> for PaymentRelay {
106
107
}
107
108
}
108
109
110
+ impl < ' a > From < DirectedChannelInfo < ' a > > for PaymentRelay {
111
+ fn from ( info : DirectedChannelInfo < ' a > ) -> Self {
112
+ let direction = info. direction ( ) ;
113
+ Self {
114
+ cltv_expiry_delta : direction. cltv_expiry_delta ,
115
+ fee_proportional_millionths : direction. fees . proportional_millionths ,
116
+ fee_base_msat : direction. fees . base_msat ,
117
+ }
118
+ }
119
+ }
120
+
109
121
impl Writeable for ForwardTlvs {
110
122
fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , io:: Error > {
111
123
encode_tlv_stream ! ( w, {
Original file line number Diff line number Diff line change @@ -1026,7 +1026,7 @@ impl<'a> DirectedChannelInfo<'a> {
1026
1026
1027
1027
/// Returns information for the direction.
1028
1028
#[ inline]
1029
- pub ( super ) fn direction ( & self ) -> & ' a ChannelUpdateInfo { self . direction }
1029
+ pub ( crate ) fn direction ( & self ) -> & ' a ChannelUpdateInfo { self . direction }
1030
1030
1031
1031
/// Returns the `node_id` of the source hop.
1032
1032
///
You can’t perform that action at this time.
0 commit comments