@@ -375,6 +375,8 @@ impl ChainSource {
375
375
}
376
376
}
377
377
378
+ // Synchronize the onchain wallet via transaction-based protocols (i.e., Esplora, Electrum,
379
+ // etc.)
378
380
pub ( crate ) async fn sync_onchain_wallet ( & self ) -> Result < ( ) , Error > {
379
381
match self {
380
382
Self :: Esplora {
@@ -490,10 +492,16 @@ impl ChainSource {
490
492
491
493
res
492
494
} ,
493
- Self :: BitcoindRpc { .. } => todo ! ( ) ,
495
+ Self :: BitcoindRpc { .. } => {
496
+ // In BitcoindRpc mode we sync lightning and onchain wallet in one go by via
497
+ // `ChainPoller`. So nothing to do here.
498
+ unreachable ! ( "Onchain wallet will be synced via chain polling" )
499
+ } ,
494
500
}
495
501
}
496
502
503
+ // Synchronize the Lightning wallet via transaction-based protocols (i.e., Esplora, Electrum,
504
+ // etc.)
497
505
pub ( crate ) async fn sync_lightning_wallet (
498
506
& self , channel_manager : Arc < ChannelManager > , chain_monitor : Arc < ChainMonitor > ,
499
507
output_sweeper : Arc < Sweeper > ,
@@ -583,7 +591,11 @@ impl ChainSource {
583
591
584
592
res
585
593
} ,
586
- Self :: BitcoindRpc { .. } => todo ! ( ) ,
594
+ Self :: BitcoindRpc { .. } => {
595
+ // In BitcoindRpc mode we sync lightning and onchain wallet in one go by via
596
+ // `ChainPoller`. So nothing to do here.
597
+ unreachable ! ( "Lightning wallet will be synced via chain polling" )
598
+ } ,
587
599
}
588
600
}
589
601
@@ -593,8 +605,9 @@ impl ChainSource {
593
605
) -> Result < ( ) , Error > {
594
606
match self {
595
607
Self :: Esplora { .. } => {
596
- debug_assert ! ( false , "Polling should only be used with chain listeners" ) ;
597
- Ok ( ( ) )
608
+ // In Esplora mode we sync lightning and onchain wallets via
609
+ // `sync_onchain_wallet` and `sync_lightning_wallet`. So nothing to do here.
610
+ unreachable ! ( "Listeners will be synced via transction-based syncing" )
598
611
} ,
599
612
Self :: BitcoindRpc {
600
613
bitcoind_rpc_client,
0 commit comments