forked from lthn/blockchain
filtering transactions improved
This commit is contained in:
parent
ea43bcf8a1
commit
d26fc8ad7f
2 changed files with 15 additions and 0 deletions
|
|
@ -3234,6 +3234,20 @@ bool enum_container(iterator_t it_begin, iterator_t it_end, callback_t cb)
|
|||
return true;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
bool wallet2::is_consolidating_transaction(const wallet_public::wallet_transfer_info& wti)
|
||||
{
|
||||
if (!wti.is_income)
|
||||
{
|
||||
uint64_t income = 0;
|
||||
for (uint64_t r : wti.td.rcv){income += r;}
|
||||
uint64_t spend = 0;
|
||||
for (uint64_t s : wti.td.spn) { spend += s; }
|
||||
if (get_tx_fee(wti.tx) + spend = income)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
void wallet2::get_recent_transfers_history(std::vector<wallet_public::wallet_transfer_info>& trs, size_t offset, size_t count, uint64_t& total, uint64_t& last_item_index, bool exclude_mining_txs, bool start_from_end)
|
||||
{
|
||||
if (!count || offset >= m_transfer_history.size())
|
||||
|
|
|
|||
|
|
@ -512,6 +512,7 @@ namespace tools
|
|||
const currency::account_base& get_account() const { return m_account; }
|
||||
|
||||
void get_recent_transfers_history(std::vector<wallet_public::wallet_transfer_info>& trs, size_t offset, size_t count, uint64_t& total, uint64_t& last_item_index, bool exclude_mining_txs = false, bool start_from_end = true);
|
||||
bool is_consolidating_transaction(const wallet_public::wallet_transfer_info& wti);
|
||||
uint64_t get_recent_transfers_total_count();
|
||||
uint64_t get_transfer_entries_count();
|
||||
void get_unconfirmed_transfers(std::vector<wallet_public::wallet_transfer_info>& trs, bool exclude_mining_txs = false);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue