mirror of
https://github.com/monero-project/monero.git
synced 2025-05-29 10:31:13 -04:00
Add get_bulk_payments rpc call
This commit is contained in:
parent
1c33b6cbee
commit
12596ad566
5 changed files with 81 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue