aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2018-03-14 19:02:21 +0900
committerstoffu <stoffu@protonmail.ch>2018-03-14 19:02:21 +0900
commit1d39b265567aad9f39bb845a36f15193592a5997 (patch)
treef14bf78b6293e6218338152bb0b5fe9c5ca221b8 /src/wallet/wallet2.cpp
parentMerge pull request #3368 (diff)
downloadmonero-1d39b265567aad9f39bb845a36f15193592a5997.tar.xz
wallet2: fix use_fork_rules() when querying version that is defined but not enabled yet
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index d845dd896..96224e81b 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -7398,7 +7398,7 @@ bool wallet2::use_fork_rules(uint8_t version, int64_t early_blocks) const
result = m_node_rpc_proxy.get_earliest_height(version, earliest_height);
throw_on_rpc_response_error(result, "get_hard_fork_info");
- bool close_enough = height >= earliest_height - early_blocks; // start using the rules that many blocks beforehand
+ bool close_enough = height >= earliest_height - early_blocks && earliest_height != std::numeric_limits<uint64_t>::max(); // start using the rules that many blocks beforehand
if (close_enough)
LOG_PRINT_L2("Using v" << (unsigned)version << " rules");
else