diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2018-06-08 14:31:49 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2018-06-08 14:31:49 -0500 |
| commit | 22c87302618fccee0de2affc9a0c689ba8aea268 (patch) | |
| tree | c7f7cbb44b635cacd39424e9f7c601cd1412a702 /src | |
| parent | 5321769b65f3dcfc8c5e893d2c3f031ea37b956c (diff) | |
| parent | 3b941befae745e3f47708c3c8681454acf12070b (diff) | |
| download | monzero-core-22c87302618fccee0de2affc9a0c689ba8aea268.tar.gz monzero-core-22c87302618fccee0de2affc9a0c689ba8aea268.tar.xz monzero-core-22c87302618fccee0de2affc9a0c689ba8aea268.zip | |
Merge pull request #3450
3b941be core: add get_earliest_ideal_height_for_version() (stoffu)
Diffstat (limited to 'src')
| -rw-r--r-- | src/cryptonote_core/blockchain.h | 7 | ||||
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 5 | ||||
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.h | 7 |
3 files changed, 19 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index 769e608ca..ef736d1e7 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -795,6 +795,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 * * @param version the version in question diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index d2796deeb..7d34415c4 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1401,6 +1401,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"; diff --git a/src/cryptonote_core/cryptonote_core.h b/src/cryptonote_core/cryptonote_core.h index 17b5680e5..567966d48 100644 --- a/src/cryptonote_core/cryptonote_core.h +++ b/src/cryptonote_core/cryptonote_core.h @@ -663,6 +663,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 * */ |
