diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h index 7c8367a1..b5ce2d0d 100644 --- a/tests/core_tests/chaingen.h +++ b/tests/core_tests/chaingen.h @@ -900,10 +900,10 @@ namespace crypto { return o << "account: " << std::endl << " addr: " << get_account_address_as_str(acc.get_public_address()) << std::endl << - " spend secret key: " << acc.get_keys().m_spend_secret_key << std::endl << - " spend public key: " << acc.get_public_address().m_spend_public_key << std::endl << - " view secret key: " << acc.get_keys().m_view_secret_key << std::endl << - " view public key: " << acc.get_public_address().m_view_public_key << std::endl << + " spend secret key: " << acc.get_keys().spend_secret_key << std::endl << + " spend public key: " << acc.get_public_address().spend_public_key << std::endl << + " view secret key: " << acc.get_keys().view_secret_key << std::endl << + " view public key: " << acc.get_public_address().view_public_key << std::endl << " timestamp: " << acc.get_createtime(); } } @@ -1140,7 +1140,7 @@ void append_vector_by_another_vector(U& dst, const V& src) #define MAKE_MINER_TX_AND_KEY_MANUALLY(TX, PREV_BLOCK, P_KEYPAIR) \ transaction TX; \ if (!construct_miner_tx_manually(get_block_height(PREV_BLOCK) + 1, generator.get_already_generated_coins(PREV_BLOCK), \ - miner_account.get_keys().m_account_address, TX, 0, P_KEYPAIR)) \ + miner_account.get_keys().account_address, TX, 0, P_KEYPAIR)) \ return false; #define MAKE_MINER_TX_MANUALLY(TX, PREV_BLOCK) MAKE_MINER_TX_AND_KEY_MANUALLY(TX, PREV_BLOCK, nullptr) diff --git a/tests/core_tests/chaingen_helpers.h b/tests/core_tests/chaingen_helpers.h index fcd77038..958085ac 100644 --- a/tests/core_tests/chaingen_helpers.h +++ b/tests/core_tests/chaingen_helpers.h @@ -193,9 +193,9 @@ inline bool resign_tx(const currency::account_keys& sender_keys, const std::vect crypto::secret_key in_ephemeral_sec = AUTO_VAL_INIT(in_ephemeral_sec); crypto::key_derivation recv_derivation = AUTO_VAL_INIT(recv_derivation); - if (!crypto::generate_key_derivation(se.real_out_tx_key, sender_keys.m_view_secret_key, recv_derivation)) + if (!crypto::generate_key_derivation(se.real_out_tx_key, sender_keys.view_secret_key, recv_derivation)) return false; - crypto::derive_secret_key(recv_derivation, se.real_output_in_tx_index, sender_keys.m_spend_secret_key, in_ephemeral_sec); + crypto::derive_secret_key(recv_derivation, se.real_output_in_tx_index, sender_keys.spend_secret_key, in_ephemeral_sec); tx.signatures.push_back(std::vector()); std::vector& sigs = tx.signatures.back(); diff --git a/tests/unit_tests/base58.cpp b/tests/unit_tests/base58.cpp index 482d86cd..d55c9a74 100644 --- a/tests/unit_tests/base58.cpp +++ b/tests/unit_tests/base58.cpp @@ -518,8 +518,8 @@ TEST(integ_address, payment_id_sizes) crypto::generate_random_bytes(pid_size, &payment_id.front()); currency::account_public_address addr; - addr.m_spend_public_key = currency::keypair::generate().pub; - addr.m_view_public_key = currency::keypair::generate().pub; + addr.spend_public_key = currency::keypair::generate().pub; + addr.view_public_key = currency::keypair::generate().pub; std::string addr_str = currency::get_account_address_and_payment_id_as_str(addr, payment_id); @@ -538,8 +538,8 @@ TEST(integ_address, payment_id_sizes) crypto::generate_random_bytes(pid_size, &payment_id.front()); currency::account_public_address addr; - addr.m_spend_public_key = currency::keypair::generate().pub; - addr.m_view_public_key = currency::keypair::generate().pub; + addr.spend_public_key = currency::keypair::generate().pub; + addr.view_public_key = currency::keypair::generate().pub; // the following line is expected to handle oversized payment id well std::string addr_str = currency::get_account_address_and_payment_id_as_str(addr, payment_id); diff --git a/tests/unit_tests/test_format_utils.cpp b/tests/unit_tests/test_format_utils.cpp index 39b40816..44f47e9b 100644 --- a/tests/unit_tests/test_format_utils.cpp +++ b/tests/unit_tests/test_format_utils.cpp @@ -14,7 +14,7 @@ TEST(parse_and_validate_tx_extra, is_correct_parse_and_validate_tx_extra) currency::account_base acc; acc.generate(); currency::blobdata b = "dsdsdfsdfsf"; - bool r = currency::construct_miner_tx(0, 0, 10000000000000, 1000, TESTS_DEFAULT_FEE, acc.get_keys().m_account_address, acc.get_keys().m_account_address, tx, b, 1); + bool r = currency::construct_miner_tx(0, 0, 10000000000000, 1000, TESTS_DEFAULT_FEE, acc.get_keys().account_address, acc.get_keys().account_address, tx, b, 1); ASSERT_TRUE(r); crypto::public_key tx_pub_key; r = currency::parse_and_validate_tx_extra(tx, tx_pub_key); @@ -26,7 +26,7 @@ TEST(parse_and_validate_tx_extra, is_correct_extranonce_too_big) currency::account_base acc; acc.generate(); currency::blobdata b(260, 0); - bool r = currency::construct_miner_tx(0, 0, 10000000000000, 1000, TESTS_DEFAULT_FEE, acc.get_keys().m_account_address, acc.get_keys().m_account_address, tx, b, 1); + bool r = currency::construct_miner_tx(0, 0, 10000000000000, 1000, TESTS_DEFAULT_FEE, acc.get_keys().account_address, acc.get_keys().account_address, tx, b, 1); ASSERT_FALSE(r); } @@ -90,8 +90,8 @@ void force_random(forced_to_pod_t& o) // currency::tx_extra_info ei = AUTO_VAL_INIT(ei); // bool r = parse_and_validate_tx_extra(miner_tx, ei); // ASSERT_TRUE(r); -// if(!(ei.m_alias.m_address.m_spend_public_key == alias.m_address.m_spend_public_key && -// ei.m_alias.m_address.m_view_public_key == alias.m_address.m_view_public_key && +// if(!(ei.m_alias.m_address.spend_public_key == alias.m_address.spend_public_key && +// ei.m_alias.m_address.view_public_key == alias.m_address.view_public_key && // ei.m_alias.m_alias == alias.m_alias && // ei.m_alias.m_sign == alias.m_sign && // ei.m_alias.m_text_comment == alias.m_text_comment && @@ -110,8 +110,8 @@ void force_random(forced_to_pod_t& o) // ei = AUTO_VAL_INIT(ei); // r = parse_and_validate_tx_extra(miner_tx, ei); // ASSERT_TRUE(r); -// if (!(ei.m_alias.m_address.m_spend_public_key == alias.m_address.m_spend_public_key && -// ei.m_alias.m_address.m_view_public_key == alias.m_address.m_view_public_key && +// if (!(ei.m_alias.m_address.spend_public_key == alias.m_address.spend_public_key && +// ei.m_alias.m_address.view_public_key == alias.m_address.view_public_key && // ei.m_alias.m_alias == alias.m_alias && // ei.m_alias.m_sign == alias.m_sign && // ei.m_alias.m_text_comment == alias.m_text_comment &&