diff options
| author | Dion Ahmetaj <Dion Ahmetaj> | 2016-10-10 15:45:51 -0400 |
|---|---|---|
| committer | Dion Ahmetaj <Dion Ahmetaj> | 2016-10-10 15:45:51 -0400 |
| commit | 412da636225f32ba62bdba7e3ed0281dcea08b05 (patch) | |
| tree | e85e4f4b94183122d8512860be490606f29741ab /src/cryptonote_core/cryptonote_core.cpp | |
| parent | 9798bde11e00b5eb3457eeb519b3f79f615a2d60 (diff) | |
| download | monzero-core-412da636225f32ba62bdba7e3ed0281dcea08b05.tar.gz monzero-core-412da636225f32ba62bdba7e3ed0281dcea08b05.tar.xz monzero-core-412da636225f32ba62bdba7e3ed0281dcea08b05.zip | |
added print_coinbase_tx_sum option
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 149fb09df..b8bceb51c 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -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; |
