From: Matt Corallo Date: Tue, 21 Apr 2020 20:18:49 +0000 (-0400) Subject: Clarify documentation on deserialization reorg requirements X-Git-Tag: v0.0.12~78^2~5 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=71f1eba91f2bcab50c84c923ebb64f76ec2f4b51;p=rust-lightning Clarify documentation on deserialization reorg requirements --- diff --git a/lightning/src/ln/channelmonitor.rs b/lightning/src/ln/channelmonitor.rs index 503a358e8..1dd12539f 100644 --- a/lightning/src/ln/channelmonitor.rs +++ b/lightning/src/ln/channelmonitor.rs @@ -837,9 +837,9 @@ impl ChannelMonitor { /// /// Note that the deserializer is only implemented for (Sha256dHash, ChannelMonitor), which /// tells you the last block hash which was block_connect()ed. You MUST rescan any blocks along - /// the "reorg path" (ie not just starting at the same height but starting at the highest - /// common block that appears on your best chain as well as on the chain which contains the - /// last block hash returned) upon deserializing the object! + /// the "reorg path" (ie disconnecting blocks until you find a common ancestor from both the + /// returned block hash and the the current chain and then reconnecting blocks to get to the + /// best chain) upon deserializing the object! pub fn write_for_disk(&self, writer: &mut W) -> Result<(), ::std::io::Error> { //TODO: We still write out all the serialization here manually instead of using the fancy //serialization framework we have, we should migrate things over to it.