diff options
author | Thomas Winget <tewinget@gmail.com> | 2014-06-13 14:05:15 -0400 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2014-06-30 07:16:50 -0400 |
commit | fc1180bc6c2a97624a7ac2684dce047dc2fb3200 (patch) | |
tree | dece753af2127c1c8b7a95cea02a53732db82f6d /src/wallet/wallet2.cpp | |
parent | Merge pull request #55 from monero-project/revert-54-master (diff) | |
download | monero-fc1180bc6c2a97624a7ac2684dce047dc2fb3200.tar.xz |
Added comments to wallet functions
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]; |