From 3204f0d53642588643312a742d13cc2b1d1e3cd9 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 30 May 2015 09:13:52 +0100 Subject: wallet: add a sweep_dust command Sends all the dust to your own wallet. May fail (if the fee required is more than the dust total). May end up paying most of the dust in fees. Unlocked dust total is now also displayed in "balance". --- src/wallet/wallet2.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/wallet/wallet2.h') diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 712cda40a..a57501786 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -201,15 +201,19 @@ namespace tools uint64_t balance() const; uint64_t unlocked_balance() const; + uint64_t unlocked_dust_balance(const tx_dust_policy &dust_policy) const; template void transfer(const std::vector& dsts, size_t fake_outputs_count, uint64_t unlock_time, uint64_t fee, const std::vector& extra, T destination_split_strategy, const tx_dust_policy& dust_policy); template void transfer(const std::vector& dsts, size_t fake_outputs_count, uint64_t unlock_time, uint64_t fee, const std::vector& extra, T destination_split_strategy, const tx_dust_policy& dust_policy, cryptonote::transaction& tx, pending_tx& ptx); void transfer(const std::vector& dsts, size_t fake_outputs_count, uint64_t unlock_time, uint64_t fee, const std::vector& extra); void transfer(const std::vector& dsts, size_t fake_outputs_count, uint64_t unlock_time, uint64_t fee, const std::vector& extra, cryptonote::transaction& tx, pending_tx& ptx); + template + void transfer_dust(size_t num_outputs, uint64_t unlock_time, uint64_t needed_fee, T destination_split_strategy, const tx_dust_policy& dust_policy, const std::vector& extra, cryptonote::transaction& tx, pending_tx &ptx); void commit_tx(pending_tx& ptx_vector); void commit_tx(std::vector& ptx_vector); std::vector create_transactions(std::vector dsts, const size_t fake_outs_count, const uint64_t unlock_time, const uint64_t fee, const std::vector extra); + std::vector create_dust_sweep_transactions(); bool check_connection(); void get_transfers(wallet2::transfer_container& incoming_transfers) const; void get_payments(const crypto::hash& payment_id, std::list& payments, uint64_t min_height = 0) const; -- cgit v1.2.3