File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,19 @@ impl_writeable_tlv_based!(BestBlock, {
7171/// when needed.
7272///
7373/// By using [`Listen::filtered_block_connected`] this interface supports clients fetching the
74- /// entire header chain and only blocks with matching transaction data using BIP 157 filters or
74+ /// entire block chain and only blocks with matching transaction data using BIP 157 filters or
7575/// other similar filtering.
76+ ///
77+ /// Each block must be connected in chain order with one (or more, if using the [`Filter`]
78+ /// interface and a registration occurred during the block processing) call to either
79+ /// [`Listen::block_connected`] or [`Listen::filtered_block_connected`] for each block.
80+ ///
81+ /// In case of a reorg, you must call [`Listen::blocks_disconnected`] once (or more, in
82+ /// reverse-chain order) with information on the "fork point" block, i.e. the highest block which
83+ /// is in both forks.
84+ ///
85+ /// Note that most implementations take a [`BestBlock`] on construction and blocks only need to be
86+ /// applied starting from that point.
7687pub trait Listen {
7788 /// Notifies the listener that a block was added at the given height, with the transaction data
7889 /// possibly filtered.
You can’t perform that action at this time.
0 commit comments