mirror of
https://github.com/monero-project/monero.git
synced 2025-07-31 23:08:47 -04:00
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.
This commit is contained in:
parent
7482253a6d
commit
635929eaca
3 changed files with 22 additions and 0 deletions
|
@ -745,6 +745,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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue