mirror of
https://github.com/monero-project/monero.git
synced 2025-08-16 11:20:21 -04:00
remove obsolete daemon selection of fake outs and old tx construction
This commit is contained in:
parent
e8049be955
commit
be001326d1
16 changed files with 18 additions and 955 deletions
|
@ -260,44 +260,6 @@ namespace rpc
|
|||
|
||||
}
|
||||
|
||||
//TODO: handle "restricted" RPC
|
||||
void DaemonHandler::handle(const GetRandomOutputsForAmounts::Request& req, GetRandomOutputsForAmounts::Response& res)
|
||||
{
|
||||
auto& chain = m_core.get_blockchain_storage();
|
||||
|
||||
try
|
||||
{
|
||||
for (const uint64_t& amount : req.amounts)
|
||||
{
|
||||
std::vector<uint64_t> indices = chain.get_random_outputs(amount, req.count);
|
||||
|
||||
outputs_for_amount ofa;
|
||||
|
||||
ofa.resize(indices.size());
|
||||
|
||||
for (size_t i = 0; i < indices.size(); i++)
|
||||
{
|
||||
crypto::public_key key = chain.get_output_key(amount, indices[i]);
|
||||
ofa[i].amount_index = indices[i];
|
||||
ofa[i].key = key;
|
||||
}
|
||||
|
||||
amount_with_random_outputs amt;
|
||||
amt.amount = amount;
|
||||
amt.outputs = ofa;
|
||||
|
||||
res.amounts_with_outputs.push_back(amt);
|
||||
}
|
||||
|
||||
res.status = Message::STATUS_OK;
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
res.status = Message::STATUS_FAILED;
|
||||
res.error_details = e.what();
|
||||
}
|
||||
}
|
||||
|
||||
void DaemonHandler::handle(const SendRawTx::Request& req, SendRawTx::Response& res)
|
||||
{
|
||||
auto tx_blob = cryptonote::tx_to_blob(req.tx);
|
||||
|
@ -824,7 +786,6 @@ namespace rpc
|
|||
REQ_RESP_TYPES_MACRO(request_type, GetTransactions, req_json, resp_message, handle);
|
||||
REQ_RESP_TYPES_MACRO(request_type, KeyImagesSpent, req_json, resp_message, handle);
|
||||
REQ_RESP_TYPES_MACRO(request_type, GetTxGlobalOutputIndices, req_json, resp_message, handle);
|
||||
REQ_RESP_TYPES_MACRO(request_type, GetRandomOutputsForAmounts, req_json, resp_message, handle);
|
||||
REQ_RESP_TYPES_MACRO(request_type, SendRawTx, req_json, resp_message, handle);
|
||||
REQ_RESP_TYPES_MACRO(request_type, GetInfo, req_json, resp_message, handle);
|
||||
REQ_RESP_TYPES_MACRO(request_type, StartMining, req_json, resp_message, handle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue