@@ -1889,12 +1889,17 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
1889
1889
Vec :: new ( )
1890
1890
}
1891
1891
1892
- /// Called by SimpleManyChannelMonitor::block_connected, which implements
1893
- /// ChainListener::block_connected.
1894
- /// Eventually this should be pub and, roughly, implement ChainListener, however this requires
1895
- /// &mut self, as well as returns new spendable outputs and outpoints to watch for spending of
1896
- /// on-chain.
1897
- fn block_connected < B : Deref , F : Deref > ( & mut self , txn_matched : & [ & Transaction ] , height : u32 , block_hash : & BlockHash , broadcaster : B , fee_estimator : F ) -> Vec < ( Txid , Vec < TxOut > ) >
1892
+ /// Called when a new block has been connected to the best chain by <SimpleManyChannelMonitor
1893
+ /// as ChainListener>::block_connected, and should thus generally not be called during normal
1894
+ /// operation. It is exposed both for users who wish to use ChannelMonitors directly and to
1895
+ /// simplify rescans that occur at load-time.
1896
+ ///
1897
+ /// This is very similar to ChainListener::block_connected itself, but requires an &mut self,
1898
+ /// and an explicit reference to a transaction broadcaster and fee estimator.
1899
+ ///
1900
+ /// Returns a list of new (txid, outputs) pairs which spends of must be watched for. Note that
1901
+ /// after this call these are also available via get_outputs_to_watch().
1902
+ pub fn block_connected < B : Deref , F : Deref > ( & mut self , txn_matched : & [ & Transaction ] , height : u32 , block_hash : & BlockHash , broadcaster : B , fee_estimator : F ) -> Vec < ( Txid , Vec < TxOut > ) >
1898
1903
where B :: Target : BroadcasterInterface ,
1899
1904
F :: Target : FeeEstimator
1900
1905
{
@@ -1992,7 +1997,14 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
1992
1997
watch_outputs
1993
1998
}
1994
1999
1995
- fn block_disconnected < B : Deref , F : Deref > ( & mut self , height : u32 , block_hash : & BlockHash , broadcaster : B , fee_estimator : F )
2000
+ /// Called when a block has been disconnected from the best chain by <SimpleManyChannelMonitor
2001
+ /// as ChainListener>::block_disconnected, and should thus generally not be called during
2002
+ /// normal operation. It is exposed both for users who wish to use ChannelMonitors directly and
2003
+ /// to simplify rescans that occur at load-time.
2004
+ ///
2005
+ /// This is very similar to ChainListener::block_disconnected itself, but requires an &mut self,
2006
+ /// and an explicit reference to a transaction broadcaster and fee estimator.
2007
+ pub fn block_disconnected < B : Deref , F : Deref > ( & mut self , height : u32 , block_hash : & BlockHash , broadcaster : B , fee_estimator : F )
1996
2008
where B :: Target : BroadcasterInterface ,
1997
2009
F :: Target : FeeEstimator
1998
2010
{
0 commit comments