mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
core: add get_earliest_ideal_height_for_version()
This commit is contained in:
parent
5710edf040
commit
3b941befae
5 changed files with 21 additions and 0 deletions
|
@ -791,6 +791,13 @@ namespace cryptonote
|
|||
*/
|
||||
uint8_t get_hard_fork_version(uint64_t height) const { return m_hardfork->get(height); }
|
||||
|
||||
/**
|
||||
* @brief returns the earliest block a given version may activate
|
||||
*
|
||||
* @return the height
|
||||
*/
|
||||
uint64_t get_earliest_ideal_height_for_version(uint8_t version) const { return m_hardfork->get_earliest_ideal_height_for_version(version); }
|
||||
|
||||
/**
|
||||
* @brief get information about hardfork voting for a version
|
||||
*
|
||||
|
|
|
@ -1427,6 +1427,11 @@ namespace cryptonote
|
|||
return get_blockchain_storage().get_hard_fork_version(height);
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
uint64_t core::get_earliest_ideal_height_for_version(uint8_t version) const
|
||||
{
|
||||
return get_blockchain_storage().get_earliest_ideal_height_for_version(version);
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
bool core::check_updates()
|
||||
{
|
||||
static const char software[] = "monero";
|
||||
|
|
|
@ -655,6 +655,13 @@ namespace cryptonote
|
|||
*/
|
||||
uint8_t get_hard_fork_version(uint64_t height) const;
|
||||
|
||||
/**
|
||||
* @brief return the earliest block a given version may activate
|
||||
*
|
||||
* @return what it says above
|
||||
*/
|
||||
uint64_t get_earliest_ideal_height_for_version(uint8_t version) const;
|
||||
|
||||
/**
|
||||
* @brief gets start_time
|
||||
*
|
||||
|
|
|
@ -99,6 +99,7 @@ namespace tests
|
|||
bool get_block_by_hash(const crypto::hash &h, cryptonote::block &blk, bool *orphan = NULL) const { return false; }
|
||||
uint8_t get_ideal_hard_fork_version(uint64_t height) const { return 0; }
|
||||
uint8_t get_hard_fork_version(uint64_t height) const { return 0; }
|
||||
uint64_t get_earliest_ideal_height_for_version(uint8_t version) const { return 0; }
|
||||
cryptonote::difficulty_type get_block_cumulative_difficulty(uint64_t height) const { return 0; }
|
||||
bool fluffy_blocks_enabled() const { return false; }
|
||||
uint64_t prevalidate_block_hashes(uint64_t height, const std::list<crypto::hash> &hashes) { return 0; }
|
||||
|
|
|
@ -78,6 +78,7 @@ public:
|
|||
bool get_block_by_hash(const crypto::hash &h, cryptonote::block &blk, bool *orphan = NULL) const { return false; }
|
||||
uint8_t get_ideal_hard_fork_version(uint64_t height) const { return 0; }
|
||||
uint8_t get_hard_fork_version(uint64_t height) const { return 0; }
|
||||
uint64_t get_earliest_ideal_height_for_version(uint8_t version) const { return 0; }
|
||||
cryptonote::difficulty_type get_block_cumulative_difficulty(uint64_t height) const { return 0; }
|
||||
bool fluffy_blocks_enabled() const { return false; }
|
||||
uint64_t prevalidate_block_hashes(uint64_t height, const std::list<crypto::hash> &hashes) { return 0; }
|
||||
|
|
Loading…
Reference in a new issue