mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 06:40:53 +00:00
refactor: Change config section and key string literals into constants (#7095)
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <xrpld/app/main/Application.h>
|
||||
#include <xrpld/core/Config.h>
|
||||
#include <xrpld/core/ConfigSections.h>
|
||||
|
||||
#include <xrpl/basics/contract.h>
|
||||
#include <xrpl/config/Constants.h>
|
||||
#include <xrpl/protocol/KeyType.h>
|
||||
#include <xrpl/protocol/SecretKey.h>
|
||||
#include <xrpl/protocol/Seed.h>
|
||||
@@ -31,12 +31,15 @@ getNodeIdentity(Application& app, boost::program_options::variables_map const& c
|
||||
if (!seed)
|
||||
Throw<std::runtime_error>("Invalid 'nodeid' in command line");
|
||||
}
|
||||
else if (app.config().exists(SECTION_NODE_SEED))
|
||||
else if (app.config().exists(Sections::kNodeSeed))
|
||||
{
|
||||
seed = parseBase58<Seed>(app.config().section(SECTION_NODE_SEED).lines().front());
|
||||
seed = parseBase58<Seed>(app.config().section(Sections::kNodeSeed).lines().front());
|
||||
|
||||
if (!seed)
|
||||
Throw<std::runtime_error>("Invalid [" SECTION_NODE_SEED "] in configuration file");
|
||||
{
|
||||
Throw<std::runtime_error>(
|
||||
std::string("Invalid [") + Sections::kNodeSeed + "] in configuration file");
|
||||
}
|
||||
}
|
||||
|
||||
if (seed)
|
||||
|
||||
Reference in New Issue
Block a user