Skip to content

Commit 48a0cac

Browse files
committed
f add cmu to write fail test
1 parent 5783f8e commit 48a0cac

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightning/src/util/persist.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,8 @@ mod tests {
10811081
let mut added_monitors = nodes[1].chain_monitor.added_monitors.lock().unwrap();
10821082
let update_map = nodes[1].chain_monitor.latest_monitor_update_id.lock().unwrap();
10831083
let update_id = update_map.get(&added_monitors[0].0.to_channel_id()).unwrap();
1084+
let cmu_map = nodes[1].chain_monitor.monitor_updates.lock().unwrap();
1085+
let cmu = &cmu_map.get(&added_monitors[0].0.to_channel_id()).unwrap()[0];
10841086
let test_txo = OutPoint {
10851087
txid: Txid::from_hex(
10861088
"8984484a580b825b9972d7adb15050b3ab624ccd731946b3eeddb92f4e7ef6be",
@@ -1107,7 +1109,7 @@ mod tests {
11071109
panic!("Returned InProgress when shouldn't have")
11081110
}
11091111
}
1110-
match ro_persister.update_persisted_channel(test_txo, None, &added_monitors[0].1, update_id.2) {
1112+
match ro_persister.update_persisted_channel(test_txo, Some(cmu), &added_monitors[0].1, update_id.2) {
11111113
ChannelMonitorUpdateStatus::UnrecoverableError => {
11121114
// correct result
11131115
}

0 commit comments

Comments
 (0)