restored wallets will have timestamp set to June 8 2014.

This commit is contained in:
Thomas Winget 2014-06-22 09:15:39 -04:00
parent de6200736d
commit bdac624899

View file

@ -68,7 +68,23 @@ DISABLE_VS_WARNINGS(4244 4345)
keccak((uint8_t *)&first, sizeof(crypto::secret_key), (uint8_t *)&second, sizeof(crypto::secret_key)); keccak((uint8_t *)&first, sizeof(crypto::secret_key), (uint8_t *)&second, sizeof(crypto::secret_key));
generate_keys(m_keys.m_account_address.m_view_public_key, m_keys.m_view_secret_key, second, two_random ? false : true); generate_keys(m_keys.m_account_address.m_view_public_key, m_keys.m_view_secret_key, second, two_random ? false : true);
struct tm timestamp;
timestamp.tm_year = 2014 - 1900; // year 2014
timestamp.tm_mon = 6 - 1; // month june
timestamp.tm_mday = 8; // 8th of june
timestamp.tm_hour = 0;
timestamp.tm_min = 0;
timestamp.tm_sec = 0;
if (recover)
{
m_creation_timestamp = mktime(&timestamp);
}
else
{
m_creation_timestamp = time(NULL); m_creation_timestamp = time(NULL);
}
return first; return first;
} }
//----------------------------------------------------------------- //-----------------------------------------------------------------