@@ -513,9 +513,6 @@ pub struct TestPersister {
513513 /// The queue of update statuses we'll return. If none are queued, ::Completed will always be
514514 /// returned.
515515 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 > > ,
519516 /// When we get an update_persisted_channel call *with* a ChannelMonitorUpdate, we insert the
520517 /// [`ChannelMonitor::get_latest_update_id`] here.
521518 ///
@@ -526,7 +523,6 @@ impl TestPersister {
526523 pub fn new ( ) -> Self {
527524 Self {
528525 update_rets : Mutex :: new ( VecDeque :: new ( ) ) ,
529- chain_sync_monitor_persistences : Mutex :: new ( VecDeque :: new ( ) ) ,
530526 offchain_monitor_updates : Mutex :: new ( new_hash_map ( ) ) ,
531527 }
532528 }
@@ -552,22 +548,13 @@ impl<Signer: sign::ecdsa::WriteableEcdsaChannelSigner> chainmonitor::Persist<Sig
552548
553549 if let Some ( update) = update {
554550 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) ;
557551 }
558552 ret
559553 }
560554
561555 fn archive_persisted_channel ( & self , funding_txo : OutPoint ) {
562556 // 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) ;
571558 }
572559}
573560
0 commit comments