File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1230,6 +1230,26 @@ pub struct ChannelHandshakeConfigUpdate {
12301230 pub channel_reserve_proportional_millionths : Option < u32 > ,
12311231}
12321232
1233+ impl From < ChannelHandshakeConfig > for ChannelHandshakeConfigUpdate {
1234+ fn from ( config : ChannelHandshakeConfig ) -> Self {
1235+ Self {
1236+ announced_channel_max_inbound_htlc_value_in_flight_percentage : Some (
1237+ config. announced_channel_max_inbound_htlc_value_in_flight_percentage ,
1238+ ) ,
1239+ unannounced_channel_max_inbound_htlc_value_in_flight_percentage : Some (
1240+ config. unannounced_channel_max_inbound_htlc_value_in_flight_percentage ,
1241+ ) ,
1242+ htlc_minimum_msat : Some ( config. our_htlc_minimum_msat ) ,
1243+ minimum_depth : Some ( config. minimum_depth ) ,
1244+ to_self_delay : Some ( config. our_to_self_delay ) ,
1245+ max_accepted_htlcs : Some ( config. our_max_accepted_htlcs ) ,
1246+ channel_reserve_proportional_millionths : Some (
1247+ config. their_channel_reserve_proportional_millionths ,
1248+ ) ,
1249+ }
1250+ }
1251+ }
1252+
12331253impl ChannelHandshakeConfig {
12341254 /// Applies the provided handshake config update.
12351255 pub fn apply ( & mut self , config : & ChannelHandshakeConfigUpdate ) {
You can’t perform that action at this time.
0 commit comments