Skip to content

Commit 437bf19

Browse files
Small edits
1 parent bf793a8 commit 437bf19

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lightning/src/ln/functional_tests.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3907,6 +3907,7 @@ fn test_no_txn_manager_serialize_deserialize() {
39073907

39083908
#[test]
39093909
fn test_manager_serialize_deserialize_events() {
3910+
// This test makes sure the events field in ChannelManager survives de/serialization
39103911
let chanmon_cfgs = create_chanmon_cfgs(2);
39113912
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
39123913
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
@@ -3916,7 +3917,7 @@ fn test_manager_serialize_deserialize_events() {
39163917
let nodes_0_deserialized: ChannelManager<EnforcingChannelKeys, &test_utils::TestChannelMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator>;
39173918
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
39183919

3919-
// Start creating the channel, but stop right before broadcasting the event message FundingBroadcastSafe
3920+
// Start creating a channel, but stop right before broadcasting the event message FundingBroadcastSafe
39203921
let channel_value = 100000;
39213922
let push_msat = 10001;
39223923
let a_flags = InitFeatures::known();
@@ -3947,6 +3948,7 @@ fn test_manager_serialize_deserialize_events() {
39473948
assert_eq!(added_monitors[0].0, funding_output);
39483949
added_monitors.clear();
39493950
}
3951+
// Normally, this is where node_a would check for a FundingBroadcastSafe event, but the test de/serializes first instead
39503952

39513953
nodes.push(node_a);
39523954
nodes.push(node_b);
@@ -3998,7 +4000,7 @@ fn test_manager_serialize_deserialize_events() {
39984000
_ => panic!("Unexpected event"),
39994001
};
40004002

4001-
// Make sure the channel is functioning as thought the de/serialization never happened
4003+
// Make sure the channel is functioning as though the de/serialization never happened
40024004
nodes[0].block_notifier.register_listener(nodes[0].node);
40034005
assert_eq!(nodes[0].node.list_channels().len(), 1);
40044006
check_added_monitors!(nodes[0], 1);

0 commit comments

Comments
 (0)