Skip to content

Commit a4f4663

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 a4f4663

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lightning/src/util/persist.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,9 +955,12 @@ 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!(
959+
"ChannelMonitor {} was stale, with no updates since LDK 0.0.118. \
959960
It cannot be read by modern versions of LDK, though also does not contain any funds left to sweep. \
960961
You should manually delete it instead",
962+
monitor_key,
963+
),
961964
)),
962965
}
963966
}

0 commit comments

Comments
 (0)