Skip to content

Commit 2a2c0d4

Browse files
committed
Remove dead code.
1 parent 414e52d commit 2a2c0d4

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lightning-graph-sync/src/processing.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ pub(crate) fn read_network_graph<R: Read>(
8484
let short_channel_id = previous_scid + scid_delta.0;
8585
previous_scid = short_channel_id;
8686

87-
// let short_channel_id = Readable::read(read_cursor)?;
8887
let node_id_1_index: BigSize = Readable::read(read_cursor)?;
8988
let node_id_2_index: BigSize = Readable::read(read_cursor)?;
9089
let node_id_1 = node_ids[node_id_1_index.0 as usize];
@@ -147,8 +146,6 @@ pub(crate) fn read_network_graph<R: Read>(
147146
};
148147

149148
for _current_update_index in 0..update_count {
150-
// println!("update index: {}", _current_update_index);
151-
152149
let scid_delta: BigSize = Readable::read(read_cursor)?;
153150
let short_channel_id = previous_scid + scid_delta.0;
154151
previous_scid = short_channel_id;
@@ -160,8 +157,7 @@ pub(crate) fn read_network_graph<R: Read>(
160157
let standard_channel_flags = channel_flags & 0b_0000_0011;
161158

162159
let mut synthetic_update = if channel_flags & 0b_1000_0000 == 0 {
163-
// full update
164-
// println!("channel flags: {:b}, scid: {}, full update", channel_flags, short_channel_id);
160+
// full update, field flags will indicate deviations from the default
165161
UnsignedChannelUpdate {
166162
chain_hash,
167163
short_channel_id,
@@ -175,9 +171,7 @@ pub(crate) fn read_network_graph<R: Read>(
175171
excess_data: vec![],
176172
}
177173
} else {
178-
// incremental update
179-
// println!("channel flags: {:b}, incremental update", channel_flags);
180-
174+
// incremental update, field flags will indicate mutated values
181175
let read_only_network_graph = network_graph.read_only();
182176
let channel = read_only_network_graph
183177
.channels()
@@ -245,7 +239,6 @@ pub(crate) fn read_network_graph<R: Read>(
245239
};
246240
}
247241

248-
// println!("full update scid/flags: {}/{}", synthetic_update.short_channel_id, synthetic_update.flags);
249242
network_graph.update_channel_unsigned(&synthetic_update)?;
250243
}
251244

0 commit comments

Comments
 (0)