aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 cacdc6b3e..dc4f4879b 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2228,7 +2228,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const std::stri
// Set blockchain height calculated from current date/time
uint64_t approx_blockchain_height = get_approximate_blockchain_height();
if(approx_blockchain_height > 0) {
- m_refresh_from_block_height = approx_blockchain_height - blocks_per_month;
+ m_refresh_from_block_height = approx_blockchain_height >= blocks_per_month ? approx_blockchain_height - blocks_per_month : 0;
}
}
bool r = store_keys(m_keys_file, password, false);