@@ -513,9 +513,6 @@ pub struct TestPersister {
513
513
/// The queue of update statuses we'll return. If none are queued, ::Completed will always be
514
514
/// returned.
515
515
pub update_rets : Mutex < VecDeque < chain:: ChannelMonitorUpdateStatus > > ,
516
- /// When we get an update_persisted_channel call with no ChannelMonitorUpdate, we insert the
517
- /// MonitorId here.
518
- pub chain_sync_monitor_persistences : Mutex < VecDeque < OutPoint > > ,
519
516
/// When we get an update_persisted_channel call *with* a ChannelMonitorUpdate, we insert the
520
517
/// [`ChannelMonitor::get_latest_update_id`] here.
521
518
///
@@ -526,7 +523,6 @@ impl TestPersister {
526
523
pub fn new ( ) -> Self {
527
524
Self {
528
525
update_rets : Mutex :: new ( VecDeque :: new ( ) ) ,
529
- chain_sync_monitor_persistences : Mutex :: new ( VecDeque :: new ( ) ) ,
530
526
offchain_monitor_updates : Mutex :: new ( new_hash_map ( ) ) ,
531
527
}
532
528
}
@@ -552,22 +548,13 @@ impl<Signer: sign::ecdsa::WriteableEcdsaChannelSigner> chainmonitor::Persist<Sig
552
548
553
549
if let Some ( update) = update {
554
550
self . offchain_monitor_updates . lock ( ) . unwrap ( ) . entry ( funding_txo) . or_insert ( new_hash_set ( ) ) . insert ( update. update_id ) ;
555
- } else {
556
- self . chain_sync_monitor_persistences . lock ( ) . unwrap ( ) . push_back ( funding_txo) ;
557
551
}
558
552
ret
559
553
}
560
554
561
555
fn archive_persisted_channel ( & self , funding_txo : OutPoint ) {
562
556
// remove the channel from the offchain_monitor_updates map
563
- match self . offchain_monitor_updates . lock ( ) . unwrap ( ) . remove ( & funding_txo) {
564
- Some ( _) => { } ,
565
- None => {
566
- // If the channel was not in the offchain_monitor_updates map, it should be in the
567
- // chain_sync_monitor_persistences map.
568
- self . chain_sync_monitor_persistences . lock ( ) . unwrap ( ) . retain ( |x| x != & funding_txo) ;
569
- }
570
- } ;
557
+ self . offchain_monitor_updates . lock ( ) . unwrap ( ) . remove ( & funding_txo) ;
571
558
}
572
559
}
573
560
0 commit comments