aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-01-29 15:09:17 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-01-29 17:21:11 +0000
commit3b1d7e03fcc1caa8898ced33e127f6ba09d66df8 (patch)
treedbec9bdbe5dc27b3c420433b99750ef036827489 /src/simplewallet/simplewallet.h
parentMerge pull request #626 (diff)
downloadmonero-3b1d7e03fcc1caa8898ced33e127f6ba09d66df8.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--src/simplewallet/simplewallet.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h
index c2a8d2296..05f42f8de 100644
--- a/src/simplewallet/simplewallet.h
+++ b/src/simplewallet/simplewallet.h
@@ -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);