aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2016-04-29 15:17:12 +0100
committerHoward Chu <hyc@symas.com>2016-04-29 15:33:28 +0100
commitcebb97c9132f8666059980f2c140b29c30436691 (patch)
tree86d96fff8bbd9698a01b2880a8d3fc30dd6055fe /src/wallet/wallet2.cpp
parentMake fast_refresh interruptible (diff)
downloadmonero-cebb97c9132f8666059980f2c140b29c30436691.tar.xz
Move refresh height to keys file from cache file
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 1656089c8..80b8da1f9 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1058,6 +1058,9 @@ bool wallet2::store_keys(const std::string& keys_file_name, const std::string& p
value2.SetInt(m_refresh_type);
json.AddMember("refresh_type", value2, json.GetAllocator());
+ value2.SetUint64(m_refresh_from_block_height);
+ json.AddMember("refresh_height", value2, json.GetAllocator());
+
// Serialize the JSON object
rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
@@ -1164,6 +1167,9 @@ bool wallet2::load_keys(const std::string& keys_file_name, const std::string& pa
else
LOG_PRINT_L0("Unknown refresh-type value (" << field_refresh_type << "), using default");
}
+ GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, refresh_height, uint64_t, Uint64, false);
+ if (field_refresh_height_found)
+ m_refresh_from_block_height = field_refresh_height;
}
const cryptonote::account_keys& keys = m_account.get_keys();