Skip to content

Commit 0335d61

Browse files
committed
f
1 parent 9256d6a commit 0335d61

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

lightning/src/ln/functional_tests.rs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3887,22 +3887,24 @@ fn test_manager_serialize_deserialize_inconsistent_monitor() {
38873887

38883888
keys_manager = test_utils::TestKeysInterface::new(&nodes[0].node_seed, Network::Testnet, Arc::new(test_utils::TestLogger::new()));
38893889

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+
};
39003901

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+
}
39063908

39073909
let mut nodes_0_read = &nodes_0_serialized[..];
39083910
let read_args = ChannelManagerReadArgs {

0 commit comments

Comments
 (0)