diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-09 09:31:00 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-09 10:28:41 +0100 |
commit | 635929eaca6b376708d7c5fabf9b743b8a706981 (patch) | |
tree | a5989505a602cd2fe0ef3a425292f9213adfd1fb /src/cryptonote_core | |
parent | epee: fixup KV_SERIALIZE_OPT to work in more cases (diff) | |
download | monero-635929eaca6b376708d7c5fabf9b743b8a706981.tar.xz |
protocol: add checks for top block hard fork version
We won't even talk to a peer which claims a wrong version
for its top block. This will avoid syncing to known bad
peers in the first place.
Also add IP fails when failing to verify a block.
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/blockchain.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index bd8a8313c..aa61dc034 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -746,6 +746,15 @@ namespace cryptonote uint8_t get_ideal_hard_fork_version(uint64_t height) const { return m_hardfork->get_ideal_version(height); } /** + * @brief returns the actual hardfork version for a given block height + * + * @param height the height for which to check version info + * + * @return the version + */ + uint8_t get_hard_fork_version(uint64_t height) const { return m_hardfork->get(height); } + + /** * @brief get information about hardfork voting for a version * * @param version the version in question |