diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-03-24 20:58:02 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-03-24 21:04:08 +0000 |
commit | 0ad87db01f19eff22ab9c3998826b7aa943975cf (patch) | |
tree | 5f9f29576f209ea777fdad8b3392314d6022c680 /src/simplewallet/simplewallet.h | |
parent | Merge pull request #1916 (diff) | |
download | monero-0ad87db01f19eff22ab9c3998826b7aa943975cf.tar.xz |
wallet: try to save large outputs when using an unneeded second input
When a single input is enough to satisfy a transfer, the code would
previously try to add a second input, to match the "canonical" makeup
of a transaction with two inputs and two outputs. This would cause
wallets to slowly merge outputs till all the monero ends up in a
single output, which causes trouble when making two transactions
one after the other, since change is locked for 10 blocks, and an
increasing portion of the remaining balance would end up locked on
each transaction.
There are two new settings (min-output-count and min-output-value)
which can control when to stop adding such unneeded second outputs.
The idea is that small "dust" outputs will still get added, but
larger ones will not.
Enable with, eg:
set min-output-count 10
set min-output-value 30
to avoid using an unneeded second output of 30 monero or more, if
there would be less than 10 such outputs left.
This does not invalidate any other reason why such outputs would
be used (ie, when they're really needed to satisfy a transfer, or
when randomly picked in the normal course of selection). This may
be improved in the future.
Diffstat (limited to '')
-rw-r--r-- | src/simplewallet/simplewallet.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index c7d65633f..bb668b123 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -117,6 +117,8 @@ namespace cryptonote bool set_confirm_missing_payment_id(const std::vector<std::string> &args = std::vector<std::string>()); bool set_ask_password(const std::vector<std::string> &args = std::vector<std::string>()); bool set_unit(const std::vector<std::string> &args = std::vector<std::string>()); + bool set_min_output_count(const std::vector<std::string> &args = std::vector<std::string>()); + bool set_min_output_value(const std::vector<std::string> &args = std::vector<std::string>()); bool help(const std::vector<std::string> &args = std::vector<std::string>()); bool start_mining(const std::vector<std::string> &args); bool stop_mining(const std::vector<std::string> &args); |