mirror of
https://github.com/monero-project/monero.git
synced 2025-06-12 01:32:49 -04:00
wallet: new transaction construction algorithm
It should avoid a lot of the issues sending more than half the wallet's contents due to change. Actual output selection is still random. Changing this would improve the matching of transaction amounts to output sizes, but may have non obvious effects on blockchain analysis. Mapped to the new transfer_new command in simplewallet, and transfer uses the existing algorithm. To use in RPC, add "new_algorithm: true" in the transfer_split JSON command. It is not used in the transfer command.
This commit is contained in:
parent
1737fec297
commit
988fe1f843
6 changed files with 438 additions and 5 deletions
|
@ -254,7 +254,11 @@ namespace tools
|
|||
|
||||
try
|
||||
{
|
||||
std::vector<wallet2::pending_tx> ptx_vector = m_wallet.create_transactions(dsts, req.mixin, req.unlock_time, req.fee, extra);
|
||||
std::vector<wallet2::pending_tx> ptx_vector;
|
||||
if (req.new_algorithm)
|
||||
ptx_vector = m_wallet.create_transactions_2(dsts, req.mixin, req.unlock_time, req.fee, extra);
|
||||
else
|
||||
ptx_vector = m_wallet.create_transactions(dsts, req.mixin, req.unlock_time, req.fee, extra);
|
||||
|
||||
m_wallet.commit_tx(ptx_vector);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue