Fix missing peering port doc when running --generate_config node (#4123)

When running:
./nano_node --generate_config node

the peering_port doc was not printed because peering port is an optional
and it is only printed when the optional is set.

fixes #4122
This commit is contained in:
Dimitrios Siganos 2023-02-14 12:41:26 +00:00 committed by GitHub
commit 295f4671b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -681,6 +681,8 @@ std::error_code nano::handle_node_options (boost::program_options::variables_map
valid_type = true;
nano::network_params network_params{ nano::network_constants::active_network };
nano::daemon_config config{ data_path, network_params };
// set the peering port to the default value so that it is printed in the example toml file
config.node.peering_port = network_params.network.default_node_port;
config.serialize_toml (toml);
}
else if (type == "rpc")