@@ -3887,22 +3887,24 @@ fn test_manager_serialize_deserialize_inconsistent_monitor() {
3887
3887
3888
3888
keys_manager = test_utils:: TestKeysInterface :: new ( & nodes[ 0 ] . node_seed , Network :: Testnet , Arc :: new ( test_utils:: TestLogger :: new ( ) ) ) ;
3889
3889
3890
- let mut nodes_0_read = & nodes_0_serialized[ ..] ;
3891
- let read_args = ChannelManagerReadArgs {
3892
- default_config : UserConfig :: default ( ) ,
3893
- keys_manager : & keys_manager,
3894
- fee_estimator : & fee_estimator,
3895
- monitor : nodes[ 0 ] . chan_monitor ,
3896
- tx_broadcaster : nodes[ 0 ] . tx_broadcaster . clone ( ) ,
3897
- logger : Arc :: new ( test_utils:: TestLogger :: new ( ) ) ,
3898
- channel_monitors : & mut node_0_stale_monitors. iter_mut ( ) . map ( |monitor| { ( monitor. get_funding_txo ( ) . unwrap ( ) , monitor) } ) . collect ( ) ,
3899
- } ;
3890
+ {
3891
+ let mut nodes_0_read = & nodes_0_serialized[ ..] ;
3892
+ let read_args = ChannelManagerReadArgs {
3893
+ default_config : UserConfig :: default ( ) ,
3894
+ keys_manager : & keys_manager,
3895
+ fee_estimator : & fee_estimator,
3896
+ monitor : nodes[ 0 ] . chan_monitor ,
3897
+ tx_broadcaster : nodes[ 0 ] . tx_broadcaster . clone ( ) ,
3898
+ logger : Arc :: new ( test_utils:: TestLogger :: new ( ) ) ,
3899
+ channel_monitors : & mut node_0_stale_monitors. iter_mut ( ) . map ( |monitor| { ( monitor. get_funding_txo ( ) . unwrap ( ) , monitor) } ) . collect ( ) ,
3900
+ } ;
3900
3901
3901
- if let Err ( msgs:: DecodeError :: InvalidValue ) =
3902
- <( Sha256dHash , ChannelManager < EnforcingChannelKeys , & test_utils:: TestChannelMonitor , & test_utils:: TestBroadcaster , & test_utils:: TestKeysInterface , & test_utils:: TestFeeEstimator > ) >:: read ( & mut nodes_0_read, read_args) {
3903
- } else {
3904
- panic ! ( "If the monitor(s) are stale, this indicates a bug and we should get an Err return" ) ;
3905
- } ;
3902
+ if let Err ( msgs:: DecodeError :: InvalidValue ) =
3903
+ <( Sha256dHash , ChannelManager < EnforcingChannelKeys , & test_utils:: TestChannelMonitor , & test_utils:: TestBroadcaster , & test_utils:: TestKeysInterface , & test_utils:: TestFeeEstimator > ) >:: read ( & mut nodes_0_read, read_args) {
3904
+ } else {
3905
+ panic ! ( "If the monitor(s) are stale, this indicates a bug and we should get an Err return" ) ;
3906
+ } ;
3907
+ }
3906
3908
3907
3909
let mut nodes_0_read = & nodes_0_serialized[ ..] ;
3908
3910
let read_args = ChannelManagerReadArgs {
0 commit comments