@@ -248,7 +248,7 @@ impl ChainNotifier {
248
248
/// disconnected to the fork point. Thus, this may return an Err() that includes where the tip
249
249
/// ended up which may not be new_header. Note that iff the returned Err has a BlockHeaderData,
250
250
/// the header transition from old_header to new_header is valid.
251
- async fn sync_listener < CL : ChainListener + Sized , P : Poll > ( & mut self , new_header : ValidatedBlockHeader , old_header : & ValidatedBlockHeader , chain_poller : & mut P , chain_listener : & mut CL ) ->
251
+ async fn sync_listener < CL : ChainListener , P : Poll > ( & mut self , new_header : ValidatedBlockHeader , old_header : & ValidatedBlockHeader , chain_poller : & mut P , chain_listener : & mut CL ) ->
252
252
Result < ( ) , ( BlockSourceError , Option < ValidatedBlockHeader > ) >
253
253
{
254
254
let mut events = self . find_fork ( new_header, old_header, chain_poller) . await . map_err ( |e| ( e, None ) ) ?;
@@ -392,7 +392,7 @@ impl<CS, B, F, L> ChainListener for (&mut ChannelMonitor<CS>, &B, &F, &L)
392
392
/// to bring each ChannelMonitor, as well as the overall ChannelManager, into sync with each other.
393
393
///
394
394
/// Once you have them all at the same block, you should switch to using MicroSPVClient.
395
- pub async fn init_sync_listener < CL : ChainListener + Sized , B : BlockSource > ( new_block : BlockHash , old_block : BlockHash , block_source : & mut B , network : Network , chain_listener : & mut CL ) {
395
+ pub async fn init_sync_listener < CL : ChainListener , B : BlockSource > ( new_block : BlockHash , old_block : BlockHash , block_source : & mut B , network : Network , chain_listener : & mut CL ) {
396
396
if & old_block[ ..] == & [ 0 ; 32 ] { return ; }
397
397
if old_block == new_block { return ; }
398
398
@@ -455,7 +455,7 @@ impl<P: Poll> MicroSPVClient<P> {
455
455
456
456
/// Check each source for a new best tip and update the chain listener accordingly.
457
457
/// Returns true if some blocks were [dis]connected, false otherwise.
458
- pub async fn poll_best_tip < CL : ChainListener + Sized > ( & mut self , chain_listener : & mut CL ) ->
458
+ pub async fn poll_best_tip < CL : ChainListener > ( & mut self , chain_listener : & mut CL ) ->
459
459
BlockSourceResult < ( ChainTip , bool ) >
460
460
{
461
461
let chain_tip = self . chain_poller . poll_chain_tip ( self . chain_tip ) . await ?;
@@ -477,7 +477,7 @@ impl<P: Poll> MicroSPVClient<P> {
477
477
478
478
/// Updates the chain tip, syncing the chain listener with any connected or disconnected
479
479
/// blocks. Returns whether there were any such blocks.
480
- async fn update_chain_tip < CL : ChainListener + Sized > ( & mut self , best_chain_tip : ValidatedBlockHeader , chain_listener : & mut CL ) -> bool {
480
+ async fn update_chain_tip < CL : ChainListener > ( & mut self , best_chain_tip : ValidatedBlockHeader , chain_listener : & mut CL ) -> bool {
481
481
match self . chain_notifier . sync_listener ( best_chain_tip, & self . chain_tip , & mut self . chain_poller , chain_listener) . await {
482
482
Ok ( _) => {
483
483
self . chain_tip = best_chain_tip;
0 commit comments