aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-01-17 10:47:05 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-01-17 11:12:26 +0000
commit42f86624a301854ea2b5902637c89ffdcfdf770f (patch)
treebe52bddc839ee2c977aded5b55647a44c9e68528 /src/cryptonote_core/blockchain.h
parentMerge pull request #3091 (diff)
downloadmonero-42f86624a301854ea2b5902637c89ffdcfdf770f.tar.xz
rpc: expose recent median block size in getinfo
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r--src/cryptonote_core/blockchain.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h
index 25e573a2c..113c0bf3e 100644
--- a/src/cryptonote_core/blockchain.h
+++ b/src/cryptonote_core/blockchain.h
@@ -637,6 +637,13 @@ namespace cryptonote
uint64_t get_current_cumulative_blocksize_limit() const;
/**
+ * @brief gets the blocksize median based on recent blocks (same window as for the limit)
+ *
+ * @return the median
+ */
+ uint64_t get_current_cumulative_blocksize_median() const;
+
+ /**
* @brief gets the difficulty of the block with a given height
*
* @param i the height
@@ -962,6 +969,7 @@ namespace cryptonote
// main chain
transactions_container m_transactions;
size_t m_current_block_cumul_sz_limit;
+ size_t m_current_block_cumul_sz_median;
// metadata containers
std::unordered_map<crypto::hash, std::unordered_map<crypto::key_image, std::vector<output_data_t>>> m_scan_table;