Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc: Remove readconfig #2248

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1940,30 +1940,6 @@ UniValue projects(const UniValue& params, bool fHelp)
return res;
}

UniValue readconfig(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"readconfig\n"
"\n"
"Re-reads config file; Does not overwrite pre-existing loaded values\n");

UniValue res(UniValue::VOBJ);

LOCK(cs_main);

std::string error_msg;

if (!gArgs.ReadConfigFiles(error_msg, true))
{
throw JSONRPCError(RPC_MISC_ERROR, error_msg);
}

res.pushKV("readconfig", 1);

return res;
}

UniValue readdata(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 1)
Expand Down
1 change: 0 additions & 1 deletion src/rpc/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ static const CRPCCommand vRPCCommands[] =
{ "parseaccrualsnapshotfile",&parseaccrualsnapshotfile,cat_developer },
{ "parselegacysb", &parselegacysb, cat_developer },
{ "projects", &projects, cat_developer },
{ "readconfig", &readconfig, cat_developer },
{ "readdata", &readdata, cat_developer },
{ "reorganize", &rpc_reorganize, cat_developer },
{ "sendalert", &sendalert, cat_developer },
Expand Down
1 change: 0 additions & 1 deletion src/rpc/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ extern UniValue network(const UniValue& params, bool fHelp);
extern UniValue parseaccrualsnapshotfile(const UniValue& params, bool fHelp);
extern UniValue parselegacysb(const UniValue& params, bool fHelp);
extern UniValue projects(const UniValue& params, bool fHelp);
extern UniValue readconfig(const UniValue& params, bool fHelp);
extern UniValue readdata(const UniValue& params, bool fHelp);
extern UniValue rpc_reorganize(const UniValue& params, bool fHelp);
extern UniValue sendalert(const UniValue& params, bool fHelp);
Expand Down