Do not return node_id private key in RPC call (#4459)
It could become a problem one day. This is breaking a debug API, that nobody should be using for serious tasks. So it should not cause any problems.
This commit is contained in:
parent
f8ab9be833
commit
42544be68e
2 changed files with 0 additions and 2 deletions
|
@ -2922,7 +2922,6 @@ void nano::json_handler::node_id ()
|
|||
{
|
||||
if (!ec)
|
||||
{
|
||||
response_l.put ("private", node.node_id.prv.to_string ());
|
||||
response_l.put ("public", node.node_id.pub.to_string ());
|
||||
response_l.put ("as_account", node.node_id.pub.to_account ());
|
||||
response_l.put ("node_id", node.node_id.pub.to_node_id ());
|
||||
|
|
|
@ -5406,7 +5406,6 @@ TEST (rpc, node_id)
|
|||
boost::property_tree::ptree request;
|
||||
request.put ("action", "node_id");
|
||||
auto response (wait_response (system, rpc_ctx, request));
|
||||
ASSERT_EQ (node->node_id.prv.to_string (), response.get<std::string> ("private"));
|
||||
ASSERT_EQ (node->node_id.pub.to_account (), response.get<std::string> ("as_account"));
|
||||
ASSERT_EQ (node->node_id.pub.to_node_id (), response.get<std::string> ("node_id"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue