mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
wallet2: use the same exponential splitting for normal txes
This commit is contained in:
parent
7c8d3be656
commit
2952ffd80f
1 changed files with 4 additions and 2 deletions
|
@ -1146,10 +1146,12 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions(std::vector<crypto
|
||||||
|
|
||||||
for(attempt_count = 1; ;attempt_count++)
|
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
|
// 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");
|
throw std::runtime_error("Splitting transactions returned a number of potential tx not equal to what was requested");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue