]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fromat moved code in `channel_state.rs` 2024-06-channel_state_ser
authorMatt Corallo <git@bluematt.me>
Tue, 4 Jun 2024 19:10:06 +0000 (19:10 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 4 Jun 2024 19:33:00 +0000 (19:33 +0000)
lightning/src/ln/channel_state.rs

index e46390c1353da7e50763dac99cfedab7256adc34..5e71b8fe701e07f4536a2f71e456e86fc0507566 100644 (file)
@@ -637,8 +637,8 @@ impl Readable for ChannelDetails {
                // `user_channel_id` used to be a single u64 value. In order to remain backwards compatible with
                // versions prior to 0.0.113, the u128 is serialized as two separate u64 values.
                let user_channel_id_low: u64 = user_channel_id_low.0.unwrap();
-               let user_channel_id = user_channel_id_low as u128 +
-                       ((user_channel_id_high_opt.unwrap_or(0 as u64) as u128) << 64);
+               let user_channel_id = user_channel_id_low as u128
+                       ((user_channel_id_high_opt.unwrap_or(0 as u64) as u128) << 64);
 
                Ok(Self {
                        inbound_scid_alias,