mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
wallet_rpc_server: remove mixin from transfer RPCs
it's been a while, only use ring_size now
This commit is contained in:
parent
f5d7652f73
commit
023f2c7747
@ -887,15 +887,7 @@ namespace tools
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
uint64_t mixin;
|
uint64_t mixin = m_wallet->adjust_mixin(req.ring_size ? req.ring_size - 1 : 0);
|
||||||
if(req.ring_size != 0)
|
|
||||||
{
|
|
||||||
mixin = m_wallet->adjust_mixin(req.ring_size - 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mixin = m_wallet->adjust_mixin(req.mixin);
|
|
||||||
}
|
|
||||||
uint32_t priority = m_wallet->adjust_priority(req.priority);
|
uint32_t priority = m_wallet->adjust_priority(req.priority);
|
||||||
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_2(dsts, mixin, req.unlock_time, priority, extra, req.account_index, req.subaddr_indices);
|
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_2(dsts, mixin, req.unlock_time, priority, extra, req.account_index, req.subaddr_indices);
|
||||||
|
|
||||||
@ -947,15 +939,7 @@ namespace tools
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
uint64_t mixin;
|
uint64_t mixin = m_wallet->adjust_mixin(req.ring_size ? req.ring_size - 1 : 0);
|
||||||
if(req.ring_size != 0)
|
|
||||||
{
|
|
||||||
mixin = m_wallet->adjust_mixin(req.ring_size - 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mixin = m_wallet->adjust_mixin(req.mixin);
|
|
||||||
}
|
|
||||||
uint32_t priority = m_wallet->adjust_priority(req.priority);
|
uint32_t priority = m_wallet->adjust_priority(req.priority);
|
||||||
LOG_PRINT_L2("on_transfer_split calling create_transactions_2");
|
LOG_PRINT_L2("on_transfer_split calling create_transactions_2");
|
||||||
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_2(dsts, mixin, req.unlock_time, priority, extra, req.account_index, req.subaddr_indices);
|
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_2(dsts, mixin, req.unlock_time, priority, extra, req.account_index, req.subaddr_indices);
|
||||||
@ -1365,15 +1349,7 @@ namespace tools
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
uint64_t mixin;
|
uint64_t mixin = m_wallet->adjust_mixin(req.ring_size ? req.ring_size - 1 : 0);
|
||||||
if(req.ring_size != 0)
|
|
||||||
{
|
|
||||||
mixin = m_wallet->adjust_mixin(req.ring_size - 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mixin = m_wallet->adjust_mixin(req.mixin);
|
|
||||||
}
|
|
||||||
uint32_t priority = m_wallet->adjust_priority(req.priority);
|
uint32_t priority = m_wallet->adjust_priority(req.priority);
|
||||||
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_all(req.below_amount, dsts[0].addr, dsts[0].is_subaddress, req.outputs, mixin, req.unlock_time, priority, extra, req.account_index, req.subaddr_indices);
|
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_all(req.below_amount, dsts[0].addr, dsts[0].is_subaddress, req.outputs, mixin, req.unlock_time, priority, extra, req.account_index, req.subaddr_indices);
|
||||||
|
|
||||||
@ -1428,15 +1404,7 @@ namespace tools
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
uint64_t mixin;
|
uint64_t mixin = m_wallet->adjust_mixin(req.ring_size ? req.ring_size - 1 : 0);
|
||||||
if(req.ring_size != 0)
|
|
||||||
{
|
|
||||||
mixin = m_wallet->adjust_mixin(req.ring_size - 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mixin = m_wallet->adjust_mixin(req.mixin);
|
|
||||||
}
|
|
||||||
uint32_t priority = m_wallet->adjust_priority(req.priority);
|
uint32_t priority = m_wallet->adjust_priority(req.priority);
|
||||||
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_single(ki, dsts[0].addr, dsts[0].is_subaddress, req.outputs, mixin, req.unlock_time, priority, extra);
|
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_single(ki, dsts[0].addr, dsts[0].is_subaddress, req.outputs, mixin, req.unlock_time, priority, extra);
|
||||||
|
|
||||||
|
@ -446,7 +446,6 @@ namespace wallet_rpc
|
|||||||
uint32_t account_index;
|
uint32_t account_index;
|
||||||
std::set<uint32_t> subaddr_indices;
|
std::set<uint32_t> subaddr_indices;
|
||||||
uint32_t priority;
|
uint32_t priority;
|
||||||
uint64_t mixin;
|
|
||||||
uint64_t ring_size;
|
uint64_t ring_size;
|
||||||
uint64_t unlock_time;
|
uint64_t unlock_time;
|
||||||
std::string payment_id;
|
std::string payment_id;
|
||||||
@ -460,7 +459,6 @@ namespace wallet_rpc
|
|||||||
KV_SERIALIZE(account_index)
|
KV_SERIALIZE(account_index)
|
||||||
KV_SERIALIZE(subaddr_indices)
|
KV_SERIALIZE(subaddr_indices)
|
||||||
KV_SERIALIZE(priority)
|
KV_SERIALIZE(priority)
|
||||||
KV_SERIALIZE_OPT(mixin, (uint64_t)0)
|
|
||||||
KV_SERIALIZE_OPT(ring_size, (uint64_t)0)
|
KV_SERIALIZE_OPT(ring_size, (uint64_t)0)
|
||||||
KV_SERIALIZE(unlock_time)
|
KV_SERIALIZE(unlock_time)
|
||||||
KV_SERIALIZE(payment_id)
|
KV_SERIALIZE(payment_id)
|
||||||
@ -505,7 +503,6 @@ namespace wallet_rpc
|
|||||||
uint32_t account_index;
|
uint32_t account_index;
|
||||||
std::set<uint32_t> subaddr_indices;
|
std::set<uint32_t> subaddr_indices;
|
||||||
uint32_t priority;
|
uint32_t priority;
|
||||||
uint64_t mixin;
|
|
||||||
uint64_t ring_size;
|
uint64_t ring_size;
|
||||||
uint64_t unlock_time;
|
uint64_t unlock_time;
|
||||||
std::string payment_id;
|
std::string payment_id;
|
||||||
@ -519,7 +516,6 @@ namespace wallet_rpc
|
|||||||
KV_SERIALIZE(account_index)
|
KV_SERIALIZE(account_index)
|
||||||
KV_SERIALIZE(subaddr_indices)
|
KV_SERIALIZE(subaddr_indices)
|
||||||
KV_SERIALIZE(priority)
|
KV_SERIALIZE(priority)
|
||||||
KV_SERIALIZE_OPT(mixin, (uint64_t)0)
|
|
||||||
KV_SERIALIZE_OPT(ring_size, (uint64_t)0)
|
KV_SERIALIZE_OPT(ring_size, (uint64_t)0)
|
||||||
KV_SERIALIZE(unlock_time)
|
KV_SERIALIZE(unlock_time)
|
||||||
KV_SERIALIZE(payment_id)
|
KV_SERIALIZE(payment_id)
|
||||||
@ -746,7 +742,6 @@ namespace wallet_rpc
|
|||||||
uint32_t account_index;
|
uint32_t account_index;
|
||||||
std::set<uint32_t> subaddr_indices;
|
std::set<uint32_t> subaddr_indices;
|
||||||
uint32_t priority;
|
uint32_t priority;
|
||||||
uint64_t mixin;
|
|
||||||
uint64_t ring_size;
|
uint64_t ring_size;
|
||||||
uint64_t outputs;
|
uint64_t outputs;
|
||||||
uint64_t unlock_time;
|
uint64_t unlock_time;
|
||||||
@ -762,7 +757,6 @@ namespace wallet_rpc
|
|||||||
KV_SERIALIZE(account_index)
|
KV_SERIALIZE(account_index)
|
||||||
KV_SERIALIZE(subaddr_indices)
|
KV_SERIALIZE(subaddr_indices)
|
||||||
KV_SERIALIZE(priority)
|
KV_SERIALIZE(priority)
|
||||||
KV_SERIALIZE_OPT(mixin, (uint64_t)0)
|
|
||||||
KV_SERIALIZE_OPT(ring_size, (uint64_t)0)
|
KV_SERIALIZE_OPT(ring_size, (uint64_t)0)
|
||||||
KV_SERIALIZE_OPT(outputs, (uint64_t)1)
|
KV_SERIALIZE_OPT(outputs, (uint64_t)1)
|
||||||
KV_SERIALIZE(unlock_time)
|
KV_SERIALIZE(unlock_time)
|
||||||
@ -816,7 +810,6 @@ namespace wallet_rpc
|
|||||||
{
|
{
|
||||||
std::string address;
|
std::string address;
|
||||||
uint32_t priority;
|
uint32_t priority;
|
||||||
uint64_t mixin;
|
|
||||||
uint64_t ring_size;
|
uint64_t ring_size;
|
||||||
uint64_t outputs;
|
uint64_t outputs;
|
||||||
uint64_t unlock_time;
|
uint64_t unlock_time;
|
||||||
@ -830,7 +823,6 @@ namespace wallet_rpc
|
|||||||
BEGIN_KV_SERIALIZE_MAP()
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
KV_SERIALIZE(address)
|
KV_SERIALIZE(address)
|
||||||
KV_SERIALIZE(priority)
|
KV_SERIALIZE(priority)
|
||||||
KV_SERIALIZE_OPT(mixin, (uint64_t)0)
|
|
||||||
KV_SERIALIZE_OPT(ring_size, (uint64_t)0)
|
KV_SERIALIZE_OPT(ring_size, (uint64_t)0)
|
||||||
KV_SERIALIZE_OPT(outputs, (uint64_t)1)
|
KV_SERIALIZE_OPT(outputs, (uint64_t)1)
|
||||||
KV_SERIALIZE(unlock_time)
|
KV_SERIALIZE(unlock_time)
|
||||||
|
Loading…
Reference in New Issue
Block a user