aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.h
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2019-04-23 20:32:27 +0100
committerHoward Chu <hyc@symas.com>2019-09-25 21:29:42 +0100
commit81c2ad6d5b17cf280a4a55fd6159e8dde423f5a8 (patch)
tree7bb731b721183e73afbb60e01cf3759723e4948b /src/cryptonote_core/blockchain.h
parentMerge pull request #5909 (diff)
downloadmonero-81c2ad6d5b17cf280a4a55fd6159e8dde423f5a8.tar.xz
RandomX integration
Support RandomX PoW algorithm
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r--src/cryptonote_core/blockchain.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h
index 178b2cb24..552a53e89 100644
--- a/src/cryptonote_core/blockchain.h
+++ b/src/cryptonote_core/blockchain.h
@@ -206,6 +206,18 @@ namespace cryptonote
crypto::hash get_block_id_by_height(uint64_t height) const;
/**
+ * @brief gets a block's hash given a height
+ *
+ * Used only by prepare_handle_incoming_blocks. Will look in the list of incoming blocks
+ * if the height is contained there.
+ *
+ * @param height the height of the block
+ *
+ * @return the hash of the block at the requested height, or a zeroed hash if there is no such block
+ */
+ crypto::hash get_pending_block_id_by_height(uint64_t height) const;
+
+ /**
* @brief gets the block with a given hash
*
* @param h the hash to look for
@@ -1077,6 +1089,11 @@ namespace cryptonote
std::shared_ptr<tools::Notify> m_block_notify;
std::shared_ptr<tools::Notify> m_reorg_notify;
+ // for prepare_handle_incoming_blocks
+ uint64_t m_prepare_height;
+ uint64_t m_prepare_nblocks;
+ std::vector<block> *m_prepare_blocks;
+
/**
* @brief collects the keys for all outputs being "spent" as an input
*