aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-06-17 22:00:04 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-06-17 22:00:04 +0100
commit2952ffd80f218ae86fc70c44e1d347f726c4f13f (patch)
tree8e3f092417758b7fac0bec02edabd1a6df274c6f
parentwallet2: try to split dust sweep txs exponentially (diff)
downloadmonero-2952ffd80f218ae86fc70c44e1d347f726c4f13f.tar.xz
wallet2: use the same exponential splitting for normal txes
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index d7f5da726..b798ae264 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1146,10 +1146,12 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions(std::vector<crypto
for(attempt_count = 1; ;attempt_count++)
{
- auto split_values = split_amounts(dsts, attempt_count);
+ size_t num_tx = 0.5 + pow(1.7,attempt_count-1);
+
+ auto split_values = split_amounts(dsts, num_tx);
// Throw if split_amounts comes back with a vector of size different than it should
- if (split_values.size() != attempt_count)
+ if (split_values.size() != num_tx)
{
throw std::runtime_error("Splitting transactions returned a number of potential tx not equal to what was requested");
}