aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-07-19 23:47:13 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-07-22 19:24:30 +0100
commit988fe1f843f4f95e4a9a6068d21cefbcc4ff5821 (patch)
tree53603ac51dd20d6dce15eff9029a0173900eda88 /src/wallet/wallet_rpc_server.cpp
parentMerge pull request #347 (diff)
downloadmonero-988fe1f843f4f95e4a9a6068d21cefbcc4ff5821.tar.xz
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.
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r--src/wallet/wallet_rpc_server.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 7c82e69f8..1d38695ae 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -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);