From 7c8d3be656a15d97cde33992dd379b20b5afea29 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 17 Jun 2015 21:31:16 +0100 Subject: [PATCH 1/2] wallet2: try to split dust sweep txs exponentially This ensures even massive wallets full of dust can sweep. --- src/wallet/wallet2.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 151da5602..d7f5da726 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1357,13 +1357,14 @@ std::vector wallet2::create_dust_sweep_transactions() for(attempt_count = 1; ;attempt_count++) { - size_t num_outputs_per_tx = (num_dust_outputs + attempt_count - 1) / attempt_count; + size_t num_tx = 0.5 + pow(1.7,attempt_count-1); + size_t num_outputs_per_tx = (num_dust_outputs + num_tx - 1) / num_tx; std::vector ptx_vector; try { // for each new tx - for (size_t i=0; i Date: Wed, 17 Jun 2015 22:00:04 +0100 Subject: [PATCH 2/2] wallet2: use the same exponential splitting for normal txes --- src/wallet/wallet2.cpp | 6 ++++-- 1 file 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::create_transactions(std::vector