aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_core.cpp
diff options
context:
space:
mode:
authorDion Ahmetaj <Dion Ahmetaj>2016-10-10 15:45:51 -0400
committerDion Ahmetaj <Dion Ahmetaj>2016-10-10 15:45:51 -0400
commit412da636225f32ba62bdba7e3ed0281dcea08b05 (patch)
treee85e4f4b94183122d8512860be490606f29741ab /src/cryptonote_core/cryptonote_core.cpp
parent9798bde11e00b5eb3457eeb519b3f79f615a2d60 (diff)
downloadmonzero-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.cpp14
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;