Skip to content

Commit

Permalink
Fix get_service_nodes rpc node proxy query
Browse files Browse the repository at this point in the history
Also fixes the wrong error message being shown when it fails.
  • Loading branch information
jagerman committed Jan 11, 2023
1 parent 7819285 commit bb111c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/wallet/node_rpc_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ std::pair<bool, nlohmann::json> NodeRPCProxy::get_service_nodes(std::vector<std:
{"service_node_pubkeys", pubkeys}
};
try {
auto res = m_http_client.json_rpc("get_service_nodes", pubkeys);
auto res = m_http_client.json_rpc("get_service_nodes", req_params);
resolved = res["service_node_states"];
} catch (...) {
return result;
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8106,7 +8106,7 @@ wallet2::stake_result wallet2::check_stake_allowed(const crypto::public_key& sn_
if (!success)
{
result.status = stake_result_status::service_node_list_query_failed;
result.msg = ERR_MSG_NETWORK_VERSION_QUERY_FAILED;
result.msg = ERR_MSG_SERVICE_NODE_LIST_QUERY_FAILED;
return result;
}

Expand Down Expand Up @@ -8447,7 +8447,7 @@ wallet2::register_service_node_result wallet2::create_register_service_node_tx(c
if (const auto [success, response] = get_service_nodes({service_node_key_as_str});
!success)
return {register_service_node_result_status::service_node_list_query_failed,
ERR_MSG_NETWORK_VERSION_QUERY_FAILED};
ERR_MSG_SERVICE_NODE_LIST_QUERY_FAILED};
else if (response.size() >= 1)
return {register_service_node_result_status::service_node_cannot_reregister,
tr("This service node is already registered")};
Expand Down

0 comments on commit bb111c3

Please sign in to comment.