diff --git a/rai/core_test/rpc.cpp b/rai/core_test/rpc.cpp index 2a53c77b..26bb736d 100644 --- a/rai/core_test/rpc.cpp +++ b/rai/core_test/rpc.cpp @@ -385,7 +385,7 @@ TEST (rpc, representative) std::string wallet; system.nodes [0]->wallets.items.begin ()->first.encode_hex (wallet); request.put ("wallet", wallet); - request.put ("action", "representative"); + request.put ("action", "wallet_representative"); auto response (test_response (request, rpc, system.service)); ASSERT_EQ (boost::network::http::server ::response::ok, static_cast (boost::network::http::status (response.second))); std::string account_text1 (response.first.get ("representative")); @@ -406,7 +406,7 @@ TEST (rpc, representative_set) system.nodes [0]->wallets.items.begin ()->first.encode_hex (wallet); request.put ("wallet", wallet); rai::keypair key; - request.put ("action", "representative_set"); + request.put ("action", "wallet_representative_set"); request.put ("representative", key.pub.to_account ()); auto response (test_response (request, rpc, system.service)); ASSERT_EQ (boost::network::http::server ::response::ok, static_cast (boost::network::http::status (response.second))); diff --git a/rai/node/rpc.cpp b/rai/node/rpc.cpp index f2ae169c..d3996f38 100644 --- a/rai/node/rpc.cpp +++ b/rai/node/rpc.cpp @@ -1031,7 +1031,7 @@ void rai::rpc_handler::rai_to_raw () } } -void rai::rpc_handler::representative () +void rai::rpc_handler::wallet_representative () { std::string wallet_text (request.get ("wallet")); rai::uint256_union wallet; @@ -1057,7 +1057,7 @@ void rai::rpc_handler::representative () } } -void rai::rpc_handler::representative_set () +void rai::rpc_handler::wallet_representative_set () { if (rpc.config.enable_control) { @@ -1697,14 +1697,6 @@ void rai::rpc_handler::process_request () { rai_to_raw (); } - else if (action == "representative") - { - representative (); - } - else if (action == "representative_set") - { - representative_set (); - } else if (action == "search_pending") { search_pending (); @@ -1749,6 +1741,14 @@ void rai::rpc_handler::process_request () { wallet_key_valid (); } + else if (action == "wallet_representative") + { + wallet_representative (); + } + else if (action == "wallet_representative_set") + { + wallet_representative_set (); + } else if (action == "work_generate") { work_generate (); diff --git a/rai/node/rpc.hpp b/rai/node/rpc.hpp index f5667c69..d919586b 100644 --- a/rai/node/rpc.hpp +++ b/rai/node/rpc.hpp @@ -112,8 +112,6 @@ public: void process (); void rai_to_raw (); void rai_from_raw (); - void representative (); - void representative_set (); void search_pending (); void send (); void stop (); @@ -125,6 +123,8 @@ public: void wallet_destroy (); void wallet_export (); void wallet_key_valid (); + void wallet_representative (); + void wallet_representative_set (); void work_generate (); void work_cancel (); size_t length;