- .get(&short_channel_id)
- .ok_or(LightningError {
- err: "Couldn't find channel for update".to_owned(),
- action: ErrorAction::IgnoreError,
- })?;
-
- let directional_info = channel
- .get_directional_info(channel_flags)
- .ok_or(LightningError {
- err: "Couldn't find previous directional data for update".to_owned(),
- action: ErrorAction::IgnoreError,
- })?;
-
- UnsignedChannelUpdate {
- chain_hash,
- short_channel_id,
- timestamp: backdated_timestamp,
- flags: standard_channel_flags,
- cltv_expiry_delta: directional_info.cltv_expiry_delta,
- htlc_minimum_msat: directional_info.htlc_minimum_msat,
- htlc_maximum_msat: directional_info.htlc_maximum_msat,
- fee_base_msat: directional_info.fees.base_msat,
- fee_proportional_millionths: directional_info.fees.proportional_millionths,
- excess_data: Vec::new(),
+ .get(&short_channel_id) {
+
+ let directional_info = channel
+ .get_directional_info(channel_flags)
+ .ok_or(LightningError {
+ err: "Couldn't find previous directional data for update".to_owned(),
+ action: ErrorAction::IgnoreError,
+ })?;
+
+ synthetic_update.cltv_expiry_delta = directional_info.cltv_expiry_delta;
+ synthetic_update.htlc_minimum_msat = directional_info.htlc_minimum_msat;
+ synthetic_update.htlc_maximum_msat = directional_info.htlc_maximum_msat;
+ synthetic_update.fee_base_msat = directional_info.fees.base_msat;
+ synthetic_update.fee_proportional_millionths = directional_info.fees.proportional_millionths;
+
+ } else {
+ skip_update_for_unknown_channel = true;