diff options
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index a63eb4be7..fb4673f00 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -630,10 +630,17 @@ namespace } } //---------------------------------------------------------------------------------------------------- +// Select random input sources for transaction. +// returns: +// direct return: amount of money found +// modified reference: selected_transfers, a list of iterators/indices of input sources uint64_t wallet2::select_transfers(uint64_t needed_money, bool add_dust, uint64_t dust, std::list<transfer_container::iterator>& selected_transfers) { std::vector<size_t> unused_transfers_indices; std::vector<size_t> unused_dust_indices; + + // aggregate sources available for transfers + // if dust needed, take dust from only one source (so require source has at least dust amount) for (size_t i = 0; i < m_transfers.size(); ++i) { const transfer_details& td = m_transfers[i]; |