aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authortobtoht <tob@featherwallet.org>2025-01-14 14:16:02 +0000
committertobtoht <tob@featherwallet.org>2025-01-14 14:16:02 +0000
commit460412b10e5f277605f466e649a63d91e6a3d103 (patch)
treeebe671d6437fa15e6c1532d5ca36ee8df0107655 /src/cryptonote_core/blockchain.cpp
parent3e07750ea37dd6b906accac61dfb831005da0b15 (diff)
parent41c4bc45578a36806a81b9ae13e91ce1183eba86 (diff)
downloadmonzero-core-460412b10e5f277605f466e649a63d91e6a3d103.tar.gz
monzero-core-460412b10e5f277605f466e649a63d91e6a3d103.tar.xz
monzero-core-460412b10e5f277605f466e649a63d91e6a3d103.zip
Merge pull request #9622
41c4bc4 Blockchain: get height of RingCT fork programmatically (jeffro256)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index ccb889531..ea8875d4a 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -2357,17 +2357,8 @@ void Blockchain::get_output_key_mask_unlocked(const uint64_t& amount, const uint
bool Blockchain::get_output_distribution(uint64_t amount, uint64_t from_height, uint64_t to_height, uint64_t &start_height, std::vector<uint64_t> &distribution, uint64_t &base) const
{
// rct outputs don't exist before v4
- if (amount == 0)
- {
- switch (m_nettype)
- {
- case STAGENET: start_height = stagenet_hard_forks[3].height; break;
- case TESTNET: start_height = testnet_hard_forks[3].height; break;
- case MAINNET: start_height = mainnet_hard_forks[3].height; break;
- case FAKECHAIN: start_height = 0; break;
- default: return false;
- }
- }
+ if (amount == 0 && m_nettype != network_type::FAKECHAIN)
+ start_height = m_hardfork->get_earliest_ideal_height_for_version(HF_VERSION_DYNAMIC_FEE);
else
start_height = 0;
base = 0;