From 35a3898e6e03f1fe28a21215c93fbb79c56f8ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Fri, 20 Sep 2024 09:43:24 +0200 Subject: [PATCH 1/2] DAL/Node: Fix advertisement of public port --- src/lib_dal_node/gossipsub/gossipsub.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib_dal_node/gossipsub/gossipsub.ml b/src/lib_dal_node/gossipsub/gossipsub.ml index 70d0764d09d8..e1693b30a9a8 100644 --- a/src/lib_dal_node/gossipsub/gossipsub.ml +++ b/src/lib_dal_node/gossipsub/gossipsub.ml @@ -69,6 +69,7 @@ module Transport_layer = struct Types.P2P.Metadata.Connection. {advertised_net_addr; advertised_net_port; is_bootstrap_peer} in + let config = {config with advertised_port = advertised_net_port} in P2p.create ~config ~limits -- GitLab From 12f744c7fd59f07c447d294fc1bed7f8d1c2e4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 2 Oct 2024 07:48:28 +0200 Subject: [PATCH 2/2] KVS: Fix properly the leak of opened files --- src/lib_stdlib_unix/key_value_store.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib_stdlib_unix/key_value_store.ml b/src/lib_stdlib_unix/key_value_store.ml index ffb70adfb8e3..8131db9d82d6 100644 --- a/src/lib_stdlib_unix/key_value_store.ml +++ b/src/lib_stdlib_unix/key_value_store.ml @@ -864,7 +864,9 @@ end = struct layout.filepath in Table.replace last_actions layout.filepath (Remove p) ; - Table.replace files layout.filepath (Closing p) ; + (match Table.find_opt files layout.filepath with + | None -> () + | Some _ -> Table.replace files layout.filepath (Closing p)) ; let* () = p in (* See [close_file] for an explanation of the lines below. *) (match Table.find_opt last_actions layout.filepath with -- GitLab