mirror of
https://github.com/monero-project/monero.git
synced 2025-07-23 13:40:43 -04:00
added print_coinbase_tx_sum option
This commit is contained in:
parent
9798bde11e
commit
412da63622
10 changed files with 227 additions and 110 deletions
|
@ -616,6 +616,20 @@ namespace cryptonote
|
|||
return true;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
uint64_t core::get_coinbase_tx_sum(const uint64_t start_height, const uint64_t end_height)
|
||||
{
|
||||
std::list<block> blocks;
|
||||
uint64_t coinbase_tx_sum = 0;
|
||||
uint64_t current_index = start_height;
|
||||
this->get_blocks(start_height, end_height - start_height, blocks);
|
||||
BOOST_FOREACH(auto& b, blocks)
|
||||
{
|
||||
coinbase_tx_sum += get_outs_money_amount(b.miner_tx);
|
||||
}
|
||||
|
||||
return coinbase_tx_sum;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
bool core::check_tx_inputs_keyimages_diff(const transaction& tx) const
|
||||
{
|
||||
std::unordered_set<crypto::key_image> ki;
|
||||
|
|
|
@ -141,7 +141,7 @@ namespace cryptonote
|
|||
* @note see Blockchain::cleanup_handle_incoming_blocks
|
||||
*/
|
||||
bool cleanup_handle_incoming_blocks(bool force_sync = false);
|
||||
|
||||
|
||||
/**
|
||||
* @brief check the size of a block against the current maximum
|
||||
*
|
||||
|
@ -600,6 +600,13 @@ namespace cryptonote
|
|||
*/
|
||||
size_t get_block_sync_size() const { return block_sync_size; }
|
||||
|
||||
/**
|
||||
* @brief get the sum of coinbase tx amounts between blocks
|
||||
*
|
||||
* @return the number of blocks to sync in one go
|
||||
*/
|
||||
uint64_t get_coinbase_tx_sum(const uint64_t start_height, const uint64_t end_height);
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue