@@ -4323,7 +4323,7 @@ fn test_no_txn_manager_serialize_deserialize() {
43234323 new_chain_monitor = test_utils:: TestChainMonitor :: new ( Some ( nodes[ 0 ] . chain_source ) , nodes[ 0 ] . tx_broadcaster . clone ( ) , & logger, & fee_estimator, & persister, keys_manager) ;
43244324 nodes[ 0 ] . chain_monitor = & new_chain_monitor;
43254325 let mut chan_0_monitor_read = & chan_0_monitor_serialized. 0 [ ..] ;
4326- let ( _, mut chan_0_monitor) = <( BlockHash , ChannelMonitor < EnforcingSigner > ) >:: read (
4326+ let ( _, mut chan_0_monitor) = <( Option < BlockHash > , ChannelMonitor < EnforcingSigner > ) >:: read (
43274327 & mut chan_0_monitor_read, keys_manager) . unwrap ( ) ;
43284328 assert ! ( chan_0_monitor_read. is_empty( ) ) ;
43294329
@@ -4432,7 +4432,7 @@ fn test_manager_serialize_deserialize_events() {
44324432 new_chain_monitor = test_utils:: TestChainMonitor :: new ( Some ( nodes[ 0 ] . chain_source ) , nodes[ 0 ] . tx_broadcaster . clone ( ) , & logger, & fee_estimator, & persister, keys_manager) ;
44334433 nodes[ 0 ] . chain_monitor = & new_chain_monitor;
44344434 let mut chan_0_monitor_read = & chan_0_monitor_serialized. 0 [ ..] ;
4435- let ( _, mut chan_0_monitor) = <( BlockHash , ChannelMonitor < EnforcingSigner > ) >:: read (
4435+ let ( _, mut chan_0_monitor) = <( Option < BlockHash > , ChannelMonitor < EnforcingSigner > ) >:: read (
44364436 & mut chan_0_monitor_read, keys_manager) . unwrap ( ) ;
44374437 assert ! ( chan_0_monitor_read. is_empty( ) ) ;
44384438
@@ -4524,7 +4524,7 @@ fn test_simple_manager_serialize_deserialize() {
45244524 new_chain_monitor = test_utils:: TestChainMonitor :: new ( Some ( nodes[ 0 ] . chain_source ) , nodes[ 0 ] . tx_broadcaster . clone ( ) , & logger, & fee_estimator, & persister, keys_manager) ;
45254525 nodes[ 0 ] . chain_monitor = & new_chain_monitor;
45264526 let mut chan_0_monitor_read = & chan_0_monitor_serialized. 0 [ ..] ;
4527- let ( _, mut chan_0_monitor) = <( BlockHash , ChannelMonitor < EnforcingSigner > ) >:: read (
4527+ let ( _, mut chan_0_monitor) = <( Option < BlockHash > , ChannelMonitor < EnforcingSigner > ) >:: read (
45284528 & mut chan_0_monitor_read, keys_manager) . unwrap ( ) ;
45294529 assert ! ( chan_0_monitor_read. is_empty( ) ) ;
45304530
@@ -4608,15 +4608,15 @@ fn test_manager_serialize_deserialize_inconsistent_monitor() {
46084608 let mut node_0_stale_monitors = Vec :: new ( ) ;
46094609 for serialized in node_0_stale_monitors_serialized. iter ( ) {
46104610 let mut read = & serialized[ ..] ;
4611- let ( _, monitor) = <( BlockHash , ChannelMonitor < EnforcingSigner > ) >:: read ( & mut read, keys_manager) . unwrap ( ) ;
4611+ let ( _, monitor) = <( Option < BlockHash > , ChannelMonitor < EnforcingSigner > ) >:: read ( & mut read, keys_manager) . unwrap ( ) ;
46124612 assert ! ( read. is_empty( ) ) ;
46134613 node_0_stale_monitors. push ( monitor) ;
46144614 }
46154615
46164616 let mut node_0_monitors = Vec :: new ( ) ;
46174617 for serialized in node_0_monitors_serialized. iter ( ) {
46184618 let mut read = & serialized[ ..] ;
4619- let ( _, monitor) = <( BlockHash , ChannelMonitor < EnforcingSigner > ) >:: read ( & mut read, keys_manager) . unwrap ( ) ;
4619+ let ( _, monitor) = <( Option < BlockHash > , ChannelMonitor < EnforcingSigner > ) >:: read ( & mut read, keys_manager) . unwrap ( ) ;
46204620 assert ! ( read. is_empty( ) ) ;
46214621 node_0_monitors. push ( monitor) ;
46224622 }
@@ -7489,7 +7489,7 @@ fn test_data_loss_protect() {
74897489
74907490 // Restore node A from previous state
74917491 logger = test_utils:: TestLogger :: with_id ( format ! ( "node {}" , 0 ) ) ;
7492- let mut chain_monitor = <( BlockHash , ChannelMonitor < EnforcingSigner > ) >:: read ( & mut :: std:: io:: Cursor :: new ( previous_chain_monitor_state. 0 ) , keys_manager) . unwrap ( ) . 1 ;
7492+ let mut chain_monitor = <( Option < BlockHash > , ChannelMonitor < EnforcingSigner > ) >:: read ( & mut :: std:: io:: Cursor :: new ( previous_chain_monitor_state. 0 ) , keys_manager) . unwrap ( ) . 1 ;
74937493 chain_source = test_utils:: TestChainSource :: new ( Network :: Testnet ) ;
74947494 tx_broadcaster = test_utils:: TestBroadcaster { txn_broadcasted : Mutex :: new ( Vec :: new ( ) ) } ;
74957495 fee_estimator = test_utils:: TestFeeEstimator { sat_per_kw : 253 } ;
@@ -8364,7 +8364,7 @@ fn test_update_err_monitor_lockdown() {
83648364 let monitor = monitors. get ( & outpoint) . unwrap ( ) ;
83658365 let mut w = test_utils:: TestVecWriter ( Vec :: new ( ) ) ;
83668366 monitor. write ( & mut w) . unwrap ( ) ;
8367- let new_monitor = <( BlockHash , channelmonitor:: ChannelMonitor < EnforcingSigner > ) >:: read (
8367+ let new_monitor = <( Option < BlockHash > , channelmonitor:: ChannelMonitor < EnforcingSigner > ) >:: read (
83688368 & mut :: std:: io:: Cursor :: new ( & w. 0 ) , & test_utils:: OnlyReadsKeysInterface { } ) . unwrap ( ) . 1 ;
83698369 assert ! ( new_monitor == * monitor) ;
83708370 let watchtower = test_utils:: TestChainMonitor :: new ( Some ( & chain_source) , & chanmon_cfgs[ 0 ] . tx_broadcaster , & logger, & chanmon_cfgs[ 0 ] . fee_estimator , & persister, & node_cfgs[ 0 ] . keys_manager ) ;
@@ -8423,7 +8423,7 @@ fn test_concurrent_monitor_claim() {
84238423 let monitor = monitors. get ( & outpoint) . unwrap ( ) ;
84248424 let mut w = test_utils:: TestVecWriter ( Vec :: new ( ) ) ;
84258425 monitor. write ( & mut w) . unwrap ( ) ;
8426- let new_monitor = <( BlockHash , channelmonitor:: ChannelMonitor < EnforcingSigner > ) >:: read (
8426+ let new_monitor = <( Option < BlockHash > , channelmonitor:: ChannelMonitor < EnforcingSigner > ) >:: read (
84278427 & mut :: std:: io:: Cursor :: new ( & w. 0 ) , & test_utils:: OnlyReadsKeysInterface { } ) . unwrap ( ) . 1 ;
84288428 assert ! ( new_monitor == * monitor) ;
84298429 let watchtower = test_utils:: TestChainMonitor :: new ( Some ( & chain_source) , & chanmon_cfgs[ 0 ] . tx_broadcaster , & logger, & chanmon_cfgs[ 0 ] . fee_estimator , & persister, & node_cfgs[ 0 ] . keys_manager ) ;
@@ -8449,7 +8449,7 @@ fn test_concurrent_monitor_claim() {
84498449 let monitor = monitors. get ( & outpoint) . unwrap ( ) ;
84508450 let mut w = test_utils:: TestVecWriter ( Vec :: new ( ) ) ;
84518451 monitor. write ( & mut w) . unwrap ( ) ;
8452- let new_monitor = <( BlockHash , channelmonitor:: ChannelMonitor < EnforcingSigner > ) >:: read (
8452+ let new_monitor = <( Option < BlockHash > , channelmonitor:: ChannelMonitor < EnforcingSigner > ) >:: read (
84538453 & mut :: std:: io:: Cursor :: new ( & w. 0 ) , & test_utils:: OnlyReadsKeysInterface { } ) . unwrap ( ) . 1 ;
84548454 assert ! ( new_monitor == * monitor) ;
84558455 let watchtower = test_utils:: TestChainMonitor :: new ( Some ( & chain_source) , & chanmon_cfgs[ 0 ] . tx_broadcaster , & logger, & chanmon_cfgs[ 0 ] . fee_estimator , & persister, & node_cfgs[ 0 ] . keys_manager ) ;
0 commit comments