Skip to content

Commit 52b42cd

Browse files
committed
Include monitor name in error when failing to load a monitor
If we fail to load a `ChannelMonitor` due to the new limits in LDK 0.2, its useful to communicate which monitor failed, which we do here. Requested at #4146 (comment)
1 parent 2849ae2 commit 52b42cd

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
@@ -955,9 +955,11 @@ where
955955
Some(res) => Ok(res),
956956
None => Err(io::Error::new(
957957
io::ErrorKind::InvalidData,
958-
"ChannelMonitor was stale, with no updates since LDK 0.0.118. \
958+
format!("ChannelMonitor {} was stale, with no updates since LDK 0.0.118. \
959959
It cannot be read by modern versions of LDK, though also does not contain any funds left to sweep. \
960960
You should manually delete it instead",
961+
monitor_key,
962+
),
961963
)),
962964
}
963965
}

0 commit comments

Comments
 (0)