File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,20 @@ impl_writeable_tlv_based!(BestBlock, {
73
73
/// By using [`Listen::filtered_block_connected`] this interface supports clients fetching the
74
74
/// entire header chain and only blocks with matching transaction data using BIP 157 filters or
75
75
/// other similar filtering.
76
+ ///
77
+ /// Each block must be connected in chain order with one call to either
78
+ /// [`Listen::block_connected`] or [`Listen::filtered_block_connected`]. If a call to the
79
+ /// [`Filter`] interface was made during block processing and further transaction(s) from the same
80
+ /// block now match the filter, a second call to [`Listen::filtered_block_connected`] should be
81
+ /// made immediately for the same block (prior to any other calls to the [`Listen`] interface).
82
+ ///
83
+ /// In case of a reorg, you must call [`Listen::blocks_disconnected`] once with information on the
84
+ /// "fork point" block, i.e. the highest block that is in both forks. For backwards compatibility,
85
+ /// you may instead walk the chain backwards, calling `blocks_disconnected` for each block which is
86
+ /// disconnected in a reorg.
87
+ ///
88
+ /// Note that most implementations take a [`BestBlock`] on construction and blocks only need to be
89
+ /// applied starting from that point.
76
90
pub trait Listen {
77
91
/// Notifies the listener that a block was added at the given height, with the transaction data
78
92
/// possibly filtered.
You can’t perform that action at this time.
0 commit comments