Skip to content

Commit 4d272a9

Browse files
committed
f clarify by moving code
1 parent 5709265 commit 4d272a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2413,7 +2413,6 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
24132413
};
24142414
let (chan_update_opt, forwardee_cltv_expiry_delta) = if let Some(forwarding_id) = forwarding_id_opt {
24152415
let chan = channel_state.as_mut().unwrap().by_id.get_mut(&forwarding_id).unwrap();
2416-
let chan_update_opt = self.get_channel_update_for_onion(*short_channel_id, chan).ok();
24172416
if !chan.should_announce() && !self.default_configuration.accept_forwards_to_priv_channels {
24182417
// Note that the behavior here should be identical to the above block - we
24192418
// should NOT reveal the existence or non-existence of a private channel if
@@ -2425,6 +2424,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
24252424
// was used", so we pretend we don't have the channel here.
24262425
break Some(("Refusing to forward over real channel SCID as our counterparty requested.", 0x4000 | 10, None));
24272426
}
2427+
let chan_update_opt = self.get_channel_update_for_onion(*short_channel_id, chan).ok();
24282428

24292429
// Note that we could technically not return an error yet here and just hope
24302430
// that the connection is reestablished or monitor updated by the time we get

0 commit comments

Comments
 (0)