mirror of
https://github.com/monero-project/monero.git
synced 2025-08-08 17:42:25 -04:00
wallet_rpc_server: new estimate_tx_size_and_weight RPC
This commit is contained in:
parent
a48ef0a65a
commit
0de8a0d37d
6 changed files with 86 additions and 0 deletions
|
@ -2580,5 +2580,36 @@ namespace wallet_rpc
|
|||
typedef epee::misc_utils::struct_init<response_t> response;
|
||||
};
|
||||
|
||||
struct COMMAND_RPC_ESTIMATE_TX_SIZE_AND_WEIGHT
|
||||
{
|
||||
struct request_t
|
||||
{
|
||||
uint32_t n_inputs;
|
||||
uint32_t n_outputs;
|
||||
uint32_t ring_size;
|
||||
bool rct;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(n_inputs)
|
||||
KV_SERIALIZE(n_outputs)
|
||||
KV_SERIALIZE_OPT(ring_size, 0u)
|
||||
KV_SERIALIZE_OPT(rct, true)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
typedef epee::misc_utils::struct_init<request_t> request;
|
||||
|
||||
struct response_t
|
||||
{
|
||||
uint64_t size;
|
||||
uint64_t weight;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(size)
|
||||
KV_SERIALIZE(weight)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
typedef epee::misc_utils::struct_init<response_t> response;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue