Skip to content

Commit 9c1443d

Browse files
committed
f comments on reload
1 parent 586d46c commit 9c1443d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,11 +705,15 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out, anchors: bool) {
705705
let mut old_monitors = $old_monitors.latest_monitors.lock().unwrap();
706706
for (channel_id, mut prev_state) in old_monitors.drain() {
707707
let serialized_mon = if $use_old_mons % 3 == 0 {
708+
// Reload with the oldest `ChannelMonitor` (the one that we already told
709+
// `ChannelManager` we finished persisting).
708710
prev_state.persisted_monitor
709711
} else if $use_old_mons % 3 == 1 {
712+
// Reload with the second-oldest `ChannelMonitor`
710713
let old_mon = prev_state.persisted_monitor;
711714
prev_state.pending_monitors.drain(..).next().map(|(_, v)| v).unwrap_or(old_mon)
712715
} else {
716+
// Reload with the newest `ChannelMonitor`
713717
let old_mon = prev_state.persisted_monitor;
714718
prev_state.pending_monitors.pop().map(|(_, v)| v).unwrap_or(old_mon)
715719
};

0 commit comments

Comments
 (0)