Skip to content

Commit 1088c2c

Browse files
committed
f clarify docs on disconnect method
1 parent f8cfa51 commit 1088c2c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lightning/src/chain/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,11 @@ pub trait Listen {
8686

8787
/// Notifies the listener that one or more blocks were removed in anticipation of a reorg.
8888
///
89-
/// Indicates the new best tip is the provided [`BestBlock`].
90-
fn blocks_disconnected(&self, new_best_block: BestBlock);
89+
/// The provided [`BestBlock`] is the new best block after disconnecting blocks in the reorg
90+
/// but before connecting new ones (i.e. the "fork point" block). For backwards compatibility,
91+
/// you may instead walk the chain backwards, calling `blocks_disconnected` for each block
92+
/// which is disconnected in a reorg.
93+
fn blocks_disconnected(&self, fork_point_block: BestBlock);
9194
}
9295

9396
/// The `Confirm` trait is used to notify LDK when relevant transactions have been confirmed on

0 commit comments

Comments
 (0)