mirror of
https://github.com/monero-project/monero.git
synced 2025-07-23 05:30:50 -04:00
Build fixes for the old blockchain_storage version
This commit is contained in:
parent
7003e7c156
commit
3e89df4150
4 changed files with 18 additions and 8 deletions
|
@ -1900,19 +1900,21 @@ bool blockchain_storage::for_all_key_images(std::function<bool(const crypto::key
|
|||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
bool blockchain_storage::for_all_blocks(std::function<bool(uint64_t, const block&)> f) const
|
||||
bool blockchain_storage::for_all_blocks(std::function<bool(uint64_t, const crypto::hash&, const block&)> f) const
|
||||
{
|
||||
for (blocks_container::const_iterator i = m_blocks.begin(); i != m_blocks.end(); ++i) {
|
||||
if (!f(i->height, i->bl))
|
||||
crypto::hash hash;
|
||||
get_block_hash (i->bl, hash);
|
||||
if (!f(i->height, hash, i->bl))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
bool blockchain_storage::for_all_transactions(std::function<bool(const transaction&)> f) const
|
||||
bool blockchain_storage::for_all_transactions(std::function<bool(const crypto::hash&, const transaction&)> f) const
|
||||
{
|
||||
for (transactions_container::const_iterator i = m_transactions.begin(); i != m_transactions.end(); ++i) {
|
||||
if (!f(i->second.tx))
|
||||
if (!f(i->first, i->second.tx))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -186,8 +186,8 @@ namespace cryptonote
|
|||
uint64_t get_block_coins_generated(uint64_t height) const { return m_blocks[height].already_generated_coins; }
|
||||
|
||||
bool for_all_key_images(std::function<bool(const crypto::key_image&)>) const;
|
||||
bool for_all_blocks(std::function<bool(uint64_t height, const block&)>) const;
|
||||
bool for_all_transactions(std::function<bool(const transaction&)>) const;
|
||||
bool for_all_blocks(std::function<bool(uint64_t height, const crypto::hash&, const block&)>) const;
|
||||
bool for_all_transactions(std::function<bool(const crypto::hash&, const transaction&)>) const;
|
||||
bool for_all_outputs(std::function<bool(uint64_t amount, const crypto::hash &tx_hash, size_t tx_idx)>) const;
|
||||
|
||||
// use for testing only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue