diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-01-21 12:18:39 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-09-19 11:28:18 +0000 |
| commit | d0663837d2800948cd51dfd8e2c7f74d293c86ff (patch) | |
| tree | d97328ea62f8a8f8a3c12eefddb13e95048c8750 /src/cryptonote_basic/hardfork.h | |
| parent | 2c171a9b02f8f23cc36db0465a4b587b60e629d5 (diff) | |
| download | monzero-core-d0663837d2800948cd51dfd8e2c7f74d293c86ff.tar.gz monzero-core-d0663837d2800948cd51dfd8e2c7f74d293c86ff.tar.xz monzero-core-d0663837d2800948cd51dfd8e2c7f74d293c86ff.zip | |
core: move hardforks into its own lib
So it can be used by others without encumbrance
Diffstat (limited to 'src/cryptonote_basic/hardfork.h')
| -rw-r--r-- | src/cryptonote_basic/hardfork.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/cryptonote_basic/hardfork.h b/src/cryptonote_basic/hardfork.h index 123978b12..987dcc75a 100644 --- a/src/cryptonote_basic/hardfork.h +++ b/src/cryptonote_basic/hardfork.h @@ -29,6 +29,7 @@ #pragma once #include "syncobj.h" +#include "hardforks/hardforks.h" #include "cryptonote_basic/cryptonote_basic.h" namespace cryptonote @@ -230,14 +231,6 @@ namespace cryptonote */ uint64_t get_window_size() const { return window_size; } - struct Params { - uint8_t version; - uint8_t threshold; - uint64_t height; - time_t time; - Params(uint8_t version, uint64_t height, uint8_t threshold, time_t time): version(version), threshold(threshold), height(height), time(time) {} - }; - private: uint8_t get_block_version(uint64_t height) const; @@ -262,7 +255,7 @@ namespace cryptonote uint8_t original_version; uint64_t original_version_till_height; - std::vector<Params> heights; + std::vector<hardfork_t> heights; std::deque<uint8_t> versions; /* rolling window of the last N blocks' versions */ unsigned int last_versions[256]; /* count of the block versions in the last N blocks */ |
