diff options
author | Zachary Michaels <mikezackles@gmail.com> | 2014-07-22 12:00:25 -0400 |
---|---|---|
committer | Zachary Michaels <mikezackles@gmail.com> | 2014-07-22 12:16:15 -0400 |
commit | 12596ad566b23c0b88678c01c0d1871167fefc79 (patch) | |
tree | 3d70b64f7f529681672facc1a5d766b076ef8bc8 /src/wallet/wallet2.cpp | |
parent | Merge pull request #65 from tewinget/daemon_rpc (diff) | |
download | monero-12596ad566b23c0b88678c01c0d1871167fefc79.tar.xz |
Add get_bulk_payments rpc call
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 5b284c619..a56d3b3c9 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -574,11 +574,14 @@ void wallet2::get_transfers(wallet2::transfer_container& incoming_transfers) con incoming_transfers = m_transfers; } //---------------------------------------------------------------------------------------------------- -void wallet2::get_payments(const crypto::hash& payment_id, std::list<wallet2::payment_details>& payments) const +void wallet2::get_payments(const crypto::hash& payment_id, std::list<wallet2::payment_details>& payments, uint64_t min_height) const { auto range = m_payments.equal_range(payment_id); - std::for_each(range.first, range.second, [&payments](const payment_container::value_type& x) { - payments.push_back(x.second); + std::for_each(range.first, range.second, [&payments, &min_height](const payment_container::value_type& x) { + if (min_height < x.second.m_block_height) + { + payments.push_back(x.second); + } }); } //---------------------------------------------------------------------------------------------------- |