This commit is contained in:
@@ -109,7 +109,7 @@ namespace
|
||||
template<typename T>
|
||||
bool compare(const T& lhs, const T& rhs) noexcept
|
||||
{
|
||||
static_assert(!epee::has_padding<T>(), "type might have padding");
|
||||
static_assert(std::is_standard_layout<T>() && alignof(T) == 1, "type might have padding");
|
||||
return std::memcmp(std::addressof(lhs), std::addressof(rhs), sizeof(T)) == 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ int main(int argc, const char **argv)
|
||||
crypto::public_key pkey;
|
||||
crypto::random32_unbiased((unsigned char*)skey.data);
|
||||
crypto::secret_key_to_public_key(skey, pkey);
|
||||
printf("%s %s\n", epee::string_tools::pod_to_hex(skey).c_str(), epee::string_tools::pod_to_hex(pkey).c_str());
|
||||
printf("%s %s\n", epee::string_tools::pod_to_hex(unwrap(unwrap(skey))).c_str(), epee::string_tools::pod_to_hex(pkey).c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ static void make_wallet(unsigned int idx, tools::wallet2 &wallet)
|
||||
wallet.generate("", "", spendkey, true, false);
|
||||
ASSERT_TRUE(test_addresses[idx].address == wallet.get_account().get_public_address_str(cryptonote::TESTNET));
|
||||
wallet.decrypt_keys("");
|
||||
ASSERT_TRUE(test_addresses[idx].spendkey == epee::string_tools::pod_to_hex(wallet.get_account().get_keys().m_spend_secret_key));
|
||||
ASSERT_TRUE(test_addresses[idx].spendkey == epee::string_tools::pod_to_hex(unwrap(unwrap(wallet.get_account().get_keys().m_spend_secret_key))));
|
||||
wallet.encrypt_keys("");
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
|
||||
Reference in New Issue
Block a user