wallet: add sweep_below function

It sweeps all outputs below the given threshold

This is available via the existing sweep_all RPC, by setting
amount_threshold the desired amount (in atomic units)
This commit is contained in:
moneromooo-monero 2017-04-16 17:46:01 +01:00
parent 9a9fb0483f
commit 6df83b3efb
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
7 changed files with 39 additions and 10 deletions

View file

@ -631,7 +631,7 @@ namespace tools
try
{
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_all(dsts[0].addr, req.mixin, req.unlock_time, req.priority, extra, m_trusted_daemon);
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_all(req.below_amount, dsts[0].addr, req.mixin, req.unlock_time, req.priority, extra, m_trusted_daemon);
m_wallet->commit_tx(ptx_vector);