aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-09-14 12:54:25 +0200
committerRiccardo Spagni <ric@spagni.net>2018-09-14 12:54:25 +0200
commit239a7e10ffe44aafb89304f9d841af43adc0bb19 (patch)
treef952fbd69df9eee3a94a1ae6e5a4591ce5ba0f6d /src/rpc/core_rpc_server.cpp
parentMerge pull request #4309 (diff)
parentremove obsolete daemon selection of fake outs and old tx construction (diff)
downloadmonero-239a7e10ffe44aafb89304f9d841af43adc0bb19.tar.xz
Merge pull request #4253
be001326 remove obsolete daemon selection of fake outs and old tx construction (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 4383ad190..db7f2dbaa 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -364,49 +364,6 @@ namespace cryptonote
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
- bool core_rpc_server::on_get_random_outs(const COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::request& req, COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::response& res)
- {
- PERF_TIMER(on_get_random_outs);
- bool r;
- if (use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS>(invoke_http_mode::BIN, "/getrandom_outs.bin", req, res, r))
- return r;
-
- res.status = "Failed";
-
- if (m_restricted)
- {
- if (req.amounts.size() > 100 || req.outs_count > MAX_RESTRICTED_FAKE_OUTS_COUNT)
- {
- res.status = "Too many outs requested";
- return true;
- }
- }
-
- if(!m_core.get_random_outs_for_amounts(req, res))
- {
- return true;
- }
-
- res.status = CORE_RPC_STATUS_OK;
- std::stringstream ss;
- typedef COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::outs_for_amount outs_for_amount;
- typedef COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::out_entry out_entry;
- std::for_each(res.outs.begin(), res.outs.end(), [&](outs_for_amount& ofa)
- {
- ss << "[" << ofa.amount << "]:";
- CHECK_AND_ASSERT_MES(ofa.outs.size(), ;, "internal error: ofa.outs.size() is empty for amount " << ofa.amount);
- std::for_each(ofa.outs.begin(), ofa.outs.end(), [&](out_entry& oe)
- {
- ss << oe.global_amount_index << " ";
- });
- ss << ENDL;
- });
- std::string s = ss.str();
- LOG_PRINT_L2("COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS: " << ENDL << s);
- res.status = CORE_RPC_STATUS_OK;
- return true;
- }
- //------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_get_outs_bin(const COMMAND_RPC_GET_OUTPUTS_BIN::request& req, COMMAND_RPC_GET_OUTPUTS_BIN::response& res)
{
PERF_TIMER(on_get_outs_bin);
@@ -476,34 +433,6 @@ namespace cryptonote
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
- bool core_rpc_server::on_get_random_rct_outs(const COMMAND_RPC_GET_RANDOM_RCT_OUTPUTS::request& req, COMMAND_RPC_GET_RANDOM_RCT_OUTPUTS::response& res)
- {
- PERF_TIMER(on_get_random_rct_outs);
- bool r;
- if (use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_RANDOM_RCT_OUTPUTS>(invoke_http_mode::BIN, "/getrandom_rctouts.bin", req, res, r))
- return r;
-
- res.status = "Failed";
- if(!m_core.get_random_rct_outs(req, res))
- {
- return true;
- }
-
- res.status = CORE_RPC_STATUS_OK;
- std::stringstream ss;
- typedef COMMAND_RPC_GET_RANDOM_RCT_OUTPUTS::out_entry out_entry;
- CHECK_AND_ASSERT_MES(res.outs.size(), true, "internal error: res.outs.size() is empty");
- std::for_each(res.outs.begin(), res.outs.end(), [&](out_entry& oe)
- {
- ss << oe.global_amount_index << " ";
- });
- ss << ENDL;
- std::string s = ss.str();
- LOG_PRINT_L2("COMMAND_RPC_GET_RANDOM_RCT_OUTPUTS: " << ENDL << s);
- res.status = CORE_RPC_STATUS_OK;
- return true;
- }
- //------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_get_indexes(const COMMAND_RPC_GET_TX_GLOBAL_OUTPUTS_INDEXES::request& req, COMMAND_RPC_GET_TX_GLOBAL_OUTPUTS_INDEXES::response& res)
{
PERF_TIMER(on_get_indexes);