Skip to content

Commit 997d3ad

Browse files
committed
Move check to method
1 parent a8d00c7 commit 997d3ad

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

lightning/src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3250,7 +3250,7 @@ where
32503250
let context = self.context_mut();
32513251
let temporary_channel_id = context.channel_id;
32523252
context.channel_id = channel_id;
3253-
if context.is_colored() && temporary_channel_id != channel_id {
3253+
if context.is_colored() {
32543254
update_rgb_channel_id(&context.channel_id, &temporary_channel_id, context.rgb_kv_store.as_ref());
32553255
}
32563256

lightning/src/rgb_utils/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,9 @@ pub fn write_rgb_payment_info_file(
587587
pub(crate) fn update_rgb_channel_id(
588588
channel_id: &ChannelId, temporary_channel_id: &ChannelId, kv_store: &dyn KVStoreSync,
589589
) {
590+
if channel_id == temporary_channel_id {
591+
return;
592+
}
590593
let temp_chan_id = temporary_channel_id.0.as_hex().to_string();
591594
let chan_id = channel_id.0.as_hex().to_string();
592595

0 commit comments

Comments
 (0)