forked from lthn/blockchain
total number of HFs + "==" and "!=" for hard_forks_descriptor
This commit is contained in:
parent
5230d062c8
commit
2aa302f69a
2 changed files with 12 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ namespace currency
|
|||
{
|
||||
struct hard_forks_descriptor
|
||||
{
|
||||
constexpr static size_t m_total_count = 5;
|
||||
constexpr static size_t m_total_count = ZANO_HARDFORKS_TOTAL;
|
||||
std::array<uint64_t, m_total_count> m_height_the_hardfork_n_active_after;
|
||||
|
||||
hard_forks_descriptor()
|
||||
|
|
@ -81,6 +81,16 @@ namespace currency
|
|||
{
|
||||
return HF3_BLOCK_MINOR_VERSION;
|
||||
}
|
||||
|
||||
bool operator==(const hard_forks_descriptor& rhs) const
|
||||
{
|
||||
return m_height_the_hardfork_n_active_after == rhs.m_height_the_hardfork_n_active_after;
|
||||
}
|
||||
|
||||
bool operator!=(const hard_forks_descriptor& rhs) const
|
||||
{
|
||||
return ! operator==(rhs);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@
|
|||
#define ZANO_HARDFORK_02 2
|
||||
#define ZANO_HARDFORK_03 3
|
||||
#define ZANO_HARDFORK_04_ZARCANUM 4
|
||||
#define ZANO_HARDFORKS_TOTAL 5
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue