1
0
Fork 0
forked from lthn/blockchain

back-compatibility for new wallets fixed

This commit is contained in:
sowle 2020-05-18 17:19:21 +03:00
parent ae5269d12c
commit a9336724aa
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 6 additions and 3 deletions

View file

@ -72,10 +72,13 @@ namespace currency
a & m_keys_seed_binary;
}
static std::string vector_of_chars_to_string(const std::vector<unsigned char>& v) { return std::string(v.begin(), v.end()); }
static std::vector<unsigned char> string_to_vector_of_chars(const std::string& v) { return std::vector<unsigned char>(v.begin(), v.end()); }
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(m_keys)
KV_SERIALIZE(m_creation_timestamp)
KV_SERIALIZE(m_keys_seed_binary)
KV_SERIALIZE_CUSTOM_N(m_keys_seed_binary, std::string, vector_of_chars_to_string, string_to_vector_of_chars, "m_seed")
END_KV_SERIALIZE_MAP()
private:

View file

@ -100,8 +100,8 @@ namespace currency
END_SERIALIZE()
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE(spend_public_key)
KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE(view_public_key)
KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(spend_public_key, "m_spend_public_key")
KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(view_public_key, "m_view_public_key")
KV_SERIALIZE(flags)
END_KV_SERIALIZE_MAP()