mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 09:24:47 +00:00
Merge pull request #5866
21f6c80
rpc: move a leftover light wallet RPC out of daemon RPC (moneromooo-monero)
This commit is contained in:
commit
6e1257cfbd
3 changed files with 49 additions and 52 deletions
|
@ -255,56 +255,6 @@ namespace cryptonote
|
|||
};
|
||||
typedef epee::misc_utils::struct_init<response_t> response;
|
||||
};
|
||||
|
||||
//-----------------------------------------------
|
||||
struct COMMAND_RPC_GET_RANDOM_OUTS
|
||||
{
|
||||
struct request_t
|
||||
{
|
||||
std::vector<std::string> amounts;
|
||||
uint32_t count;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(amounts)
|
||||
KV_SERIALIZE(count)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
typedef epee::misc_utils::struct_init<request_t> request;
|
||||
|
||||
|
||||
struct output {
|
||||
std::string public_key;
|
||||
uint64_t global_index;
|
||||
std::string rct; // 64+64+64 characters long (<rct commit> + <encrypted mask> + <rct amount>)
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(public_key)
|
||||
KV_SERIALIZE(global_index)
|
||||
KV_SERIALIZE(rct)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
struct amount_out {
|
||||
uint64_t amount;
|
||||
std::vector<output> outputs;
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(amount)
|
||||
KV_SERIALIZE(outputs)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
|
||||
};
|
||||
|
||||
struct response_t
|
||||
{
|
||||
std::vector<amount_out> amount_outs;
|
||||
std::string Error;
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(amount_outs)
|
||||
KV_SERIALIZE(Error)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
typedef epee::misc_utils::struct_init<response_t> response;
|
||||
};
|
||||
//-----------------------------------------------
|
||||
struct COMMAND_RPC_SUBMIT_RAW_TX
|
||||
{
|
||||
|
|
|
@ -7457,8 +7457,8 @@ void wallet2::light_wallet_get_outs(std::vector<std::vector<tools::wallet2::get_
|
|||
|
||||
MDEBUG("LIGHTWALLET - Getting random outs");
|
||||
|
||||
cryptonote::COMMAND_RPC_GET_RANDOM_OUTS::request oreq;
|
||||
cryptonote::COMMAND_RPC_GET_RANDOM_OUTS::response ores;
|
||||
tools::COMMAND_RPC_GET_RANDOM_OUTS::request oreq;
|
||||
tools::COMMAND_RPC_GET_RANDOM_OUTS::response ores;
|
||||
|
||||
size_t light_wallet_requested_outputs_count = (size_t)((fake_outputs_count + 1) * 1.5 + 1);
|
||||
|
||||
|
|
|
@ -317,4 +317,51 @@ namespace tools
|
|||
typedef epee::misc_utils::struct_init<response_t> response;
|
||||
};
|
||||
//-----------------------------------------------
|
||||
struct COMMAND_RPC_GET_RANDOM_OUTS
|
||||
{
|
||||
struct request_t
|
||||
{
|
||||
std::vector<std::string> amounts;
|
||||
uint32_t count;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(amounts)
|
||||
KV_SERIALIZE(count)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
typedef epee::misc_utils::struct_init<request_t> request;
|
||||
|
||||
struct output {
|
||||
std::string public_key;
|
||||
uint64_t global_index;
|
||||
std::string rct; // 64+64+64 characters long (<rct commit> + <encrypted mask> + <rct amount>)
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(public_key)
|
||||
KV_SERIALIZE(global_index)
|
||||
KV_SERIALIZE(rct)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
struct amount_out {
|
||||
uint64_t amount;
|
||||
std::vector<output> outputs;
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(amount)
|
||||
KV_SERIALIZE(outputs)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
struct response_t
|
||||
{
|
||||
std::vector<amount_out> amount_outs;
|
||||
std::string Error;
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(amount_outs)
|
||||
KV_SERIALIZE(Error)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
typedef epee::misc_utils::struct_init<response_t> response;
|
||||
};
|
||||
//-----------------------------------------------
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue