mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Validating hpfs and hpws binary paths on startup (#178)
This commit is contained in:
10
src/conf.cpp
10
src/conf.cpp
@@ -563,14 +563,16 @@ namespace conf
|
||||
*/
|
||||
int validate_contract_dir_paths()
|
||||
{
|
||||
const std::string paths[7] = {
|
||||
const std::string paths[9] = {
|
||||
ctx.contract_dir,
|
||||
ctx.config_file,
|
||||
ctx.hist_dir,
|
||||
ctx.full_hist_dir,
|
||||
ctx.state_dir,
|
||||
ctx.tls_key_file,
|
||||
ctx.tls_cert_file};
|
||||
ctx.tls_cert_file,
|
||||
ctx.hpfs_exe_path,
|
||||
ctx.hpws_exe_path};
|
||||
|
||||
for (const std::string &path : paths)
|
||||
{
|
||||
@@ -582,6 +584,10 @@ namespace conf
|
||||
<< "openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout tlskey.pem -out tlscert.pem\n"
|
||||
<< "and add it to " + ctx.config_dir << std::endl;
|
||||
}
|
||||
else if (path == ctx.hpfs_exe_path || path == ctx.hpws_exe_path)
|
||||
{
|
||||
std::cout << path << " binary does not exist.\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << path << " does not exist.\n";
|
||||
|
||||
Reference in New Issue
Block a user