aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index fa9bbfde8..743a49ccb 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -3317,7 +3317,7 @@ void check_block_hard_fork_version(cryptonote::network_type nettype, uint8_t hf_
if (wallet_hard_forks[fork_index].version == hf_version)
break;
THROW_WALLET_EXCEPTION_IF(fork_index == wallet_num_hard_forks, error::wallet_internal_error, "Fork not found in table");
- uint64_t start_height = wallet_hard_forks[fork_index].height;
+ uint64_t start_height = hf_version == 1 ? 0 : wallet_hard_forks[fork_index].height;
uint64_t end_height = fork_index == wallet_num_hard_forks - 1
? std::numeric_limits<uint64_t>::max()
: wallet_hard_forks[fork_index + 1].height;
@@ -4402,7 +4402,7 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const epee:
value2.SetInt(m_key_device_type);
json.AddMember("key_on_device", value2, json.GetAllocator());
- value2.SetInt(watch_only ? 1 :0); // WTF ? JSON has different true and false types, and not boolean ??
+ value2.SetInt((watch_only || m_watch_only) ? 1 :0); // WTF ? JSON has different true and false types, and not boolean ??
json.AddMember("watch_only", value2, json.GetAllocator());
value2.SetInt(m_multisig ? 1 :0);
@@ -6314,7 +6314,7 @@ void wallet2::store_to(const std::string &path, const epee::wipeable_string &pas
if (!same_file || force_rewrite_keys)
{
- bool r = store_keys(m_keys_file, password, false);
+ bool r = store_keys(m_keys_file, password, m_watch_only);
THROW_WALLET_EXCEPTION_IF(!r, error::file_save_error, m_keys_file);
}