aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-03-21 14:48:40 +0200
committerRiccardo Spagni <ric@spagni.net>2019-03-21 14:48:40 +0200
commit5ac46c5310d68faf05e2f525a9a0c9e834f4f404 (patch)
tree023294d025659053d362d32d7f8b3731e3b6d8a3 /src/cryptonote_core/blockchain.h
parentMerge pull request #5252 (diff)
parentblockchain: speed up getting N blocks weights/long term weights (diff)
downloadmonero-5ac46c5310d68faf05e2f525a9a0c9e834f4f404.tar.xz
Merge pull request #5256
4b21d38d blockchain: speed up getting N blocks weights/long term weights (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r--src/cryptonote_core/blockchain.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h
index 4744defc5..3b8169764 100644
--- a/src/cryptonote_core/blockchain.h
+++ b/src/cryptonote_core/blockchain.h
@@ -1288,14 +1288,25 @@ namespace cryptonote
/**
* @brief gets recent block weights for median calculation
*
- * get the block weights of the last <count> blocks, and return by reference <sz>.
+ * get the block weights of the last <count> blocks, and return by reference <weights>.
*
- * @param sz return-by-reference the list of weights
+ * @param weights return-by-reference the list of weights
* @param count the number of blocks to get weights for
*/
void get_last_n_blocks_weights(std::vector<uint64_t>& weights, size_t count) const;
/**
+ * @brief gets recent block long term weights for median calculation
+ *
+ * get the block long term weights of the last <count> blocks, and return by reference <weights>.
+ *
+ * @param weights return-by-reference the list of weights
+ * @param start_height the block height of the first block to query
+ * @param count the number of blocks to get weights for
+ */
+ void get_long_term_block_weights(std::vector<uint64_t>& weights, uint64_t start_height, size_t count) const;
+
+ /**
* @brief checks if a transaction is unlocked (its outputs spendable)
*
* This function checks to see if a transaction is unlocked.