Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking for next (voted upon) fork.
This commit is contained in:
@@ -177,7 +177,8 @@ namespace cryptonote
|
||||
void update(uint64_t height, bool force = false)
|
||||
{
|
||||
auto current_time = std::chrono::system_clock::now();
|
||||
if (std::chrono::seconds(DIFFICULTY_TARGET / 2) < current_time - m_blockchain_height_update_time || m_blockchain_height <= height)
|
||||
const auto node_update_threshold = std::chrono::seconds(DIFFICULTY_TARGET_V1 / 2); // use min of V1/V2
|
||||
if (node_update_threshold < current_time - m_blockchain_height_update_time || m_blockchain_height <= height)
|
||||
{
|
||||
update_blockchain_height();
|
||||
m_blockchain_height = (std::max)(m_blockchain_height, height);
|
||||
|
||||
Reference in New Issue
Block a user