Skip to content

Commit 101c637

Browse files
committed
NEW: Clarify documentation on deserialization reorg requirements
1 parent 7bd7da5 commit 101c637

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/ln/channelmonitor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -837,9 +837,9 @@ impl<ChanSigner: ChannelKeys + Writeable> ChannelMonitor<ChanSigner> {
837837
///
838838
/// Note that the deserializer is only implemented for (Sha256dHash, ChannelMonitor), which
839839
/// tells you the last block hash which was block_connect()ed. You MUST rescan any blocks along
840-
/// the "reorg path" (ie not just starting at the same height but starting at the highest
841-
/// common block that appears on your best chain as well as on the chain which contains the
842-
/// last block hash returned) upon deserializing the object!
840+
/// the "reorg path" (ie disconnecting blocks until you find a common ancestor from both the
841+
/// returned block hash and the the current chain and then reconnecting blocks to get to the
842+
/// best chain) upon deserializing the object!
843843
pub fn write_for_disk<W: Writer>(&self, writer: &mut W) -> Result<(), ::std::io::Error> {
844844
//TODO: We still write out all the serialization here manually instead of using the fancy
845845
//serialization framework we have, we should migrate things over to it.

0 commit comments

Comments
 (0)