diff --git a/src/lib_dal_node/gossipsub/gossipsub.ml b/src/lib_dal_node/gossipsub/gossipsub.ml index 70d0764d09d866c64e9eeb688c124d4af56b3edc..e1693b30a9a82b910644c0a4cedd2d9a9052db1b 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 diff --git a/src/lib_stdlib_unix/key_value_store.ml b/src/lib_stdlib_unix/key_value_store.ml index ffb70adfb8e3fd164342a0198567570ae8a9b50f..8131db9d82d6a1e4103bcd25b5cf9c3c1f69e9df 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