From 2aa1db2636cea00007c960aa17421dadb99a435a Mon Sep 17 00:00:00 2001 From: sowle Date: Thu, 23 Apr 2020 17:12:26 +0300 Subject: [PATCH 1/3] more fixes for performance tests --- tests/performance_tests/check_ring_signature.h | 2 +- tests/performance_tests/construct_tx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/performance_tests/check_ring_signature.h b/tests/performance_tests/check_ring_signature.h index a016e84f..5a56a783 100644 --- a/tests/performance_tests/check_ring_signature.h +++ b/tests/performance_tests/check_ring_signature.h @@ -34,7 +34,7 @@ public: m_alice.generate(); std::vector destinations; - destinations.push_back(tx_destination_entry(this->m_source_amount, m_alice.get_keys().m_account_address)); + destinations.push_back(tx_destination_entry(this->m_source_amount, m_alice.get_keys().account_address)); if (!construct_tx(this->m_miners[this->real_source_idx].get_keys(), this->m_sources, destinations, m_tx, 0)) return false; diff --git a/tests/performance_tests/construct_tx.h b/tests/performance_tests/construct_tx.h index 747160b6..682a4b84 100644 --- a/tests/performance_tests/construct_tx.h +++ b/tests/performance_tests/construct_tx.h @@ -34,7 +34,7 @@ public: for (size_t i = 0; i < out_count; ++i) { - m_destinations.push_back(tx_destination_entry(this->m_source_amount / out_count, m_alice.get_keys().m_account_address)); + m_destinations.push_back(tx_destination_entry(this->m_source_amount / out_count, m_alice.get_keys().account_address)); } return true; From 78d960fe0846129a1ebcdc32946bcda327d356f8 Mon Sep 17 00:00:00 2001 From: sowle Date: Thu, 23 Apr 2020 17:33:15 +0300 Subject: [PATCH 2/3] get rid of obsolete function argument modifier --- contrib/epee/include/file_io_utils.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/epee/include/file_io_utils.h b/contrib/epee/include/file_io_utils.h index 3e850493..7ece78b1 100644 --- a/contrib/epee/include/file_io_utils.h +++ b/contrib/epee/include/file_io_utils.h @@ -79,7 +79,7 @@ namespace file_io_utils #ifdef BOOST_LEXICAL_CAST_INCLUDED inline - bool get_not_used_filename(const std::string& folder, OUT std::string& result_name) + bool get_not_used_filename(const std::string& folder, std::string& result_name) { DWORD folder_attr = ::GetFileAttributesA(folder.c_str()); if(folder_attr == INVALID_FILE_ATTRIBUTES) @@ -359,7 +359,7 @@ namespace file_io_utils } */ inline - bool get_file_time(const std::string& path_to_file, OUT time_t& ft) + bool get_file_time(const std::string& path_to_file, time_t& ft) { boost::system::error_code ec; ft = boost::filesystem::last_write_time(epee::string_encoding::utf8_to_wstring(path_to_file), ec); @@ -538,7 +538,7 @@ namespace file_io_utils } */ #ifdef WINDOWS_PLATFORM - inline bool get_folder_content(const std::string& path, std::list& OUT target_list) + inline bool get_folder_content(const std::string& path, std::list& target_list) { WIN32_FIND_DATAA find_data = {0}; HANDLE hfind = ::FindFirstFileA((path + "\\*.*").c_str(), &find_data); @@ -556,7 +556,7 @@ namespace file_io_utils return true; } #endif - inline bool get_folder_content(const std::string& path, std::list& OUT target_list, bool only_files = false) + inline bool get_folder_content(const std::string& path, std::list& target_list, bool only_files = false) { try { From e50bc239df17ecd6adc32224b551daf05dabc7d4 Mon Sep 17 00:00:00 2001 From: sowle Date: Thu, 23 Apr 2020 17:42:22 +0300 Subject: [PATCH 3/3] genesis_config_json_struct restored --- src/currency_core/currency_format_utils.h | 66 +++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/src/currency_core/currency_format_utils.h b/src/currency_core/currency_format_utils.h index ae76dc55..48441033 100644 --- a/src/currency_core/currency_format_utils.h +++ b/src/currency_core/currency_format_utils.h @@ -67,6 +67,72 @@ namespace currency }; //--------------------------------------------------------------------------------------------------------------- + struct genesis_payment_entry + { + std::string paid_prm; + std::string prm_usd_price; + std::string paid_xmr; + std::string xmr_usd_price; + std::string paid_qtum; + std::string qtum_usd_price; + std::string paid_bch; + std::string bch_usd_price; + std::string paid_rep; + std::string rep_usd_price; + std::string paid_dash; + std::string dash_usd_price; + std::string paid_ltc; + std::string ltc_usd_price; + std::string paid_eos; + std::string eos_usd_price; + std::string paid_eth; + std::string eth_usd_price; + std::string paid_btc; + std::string btc_usd_price; + std::string address_this; + double amount_this_coin_fl; + double amount_this_coin_int; + std::string this_usd_price; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(paid_prm) + KV_SERIALIZE(prm_usd_price) + KV_SERIALIZE(paid_xmr) + KV_SERIALIZE(xmr_usd_price) + KV_SERIALIZE(paid_qtum) + KV_SERIALIZE(qtum_usd_price) + KV_SERIALIZE(paid_bch) + KV_SERIALIZE(bch_usd_price) + KV_SERIALIZE(paid_rep) + KV_SERIALIZE(rep_usd_price) + KV_SERIALIZE(paid_dash) + KV_SERIALIZE(dash_usd_price) + KV_SERIALIZE(paid_ltc) + KV_SERIALIZE(ltc_usd_price) + KV_SERIALIZE(paid_eos) + KV_SERIALIZE(eos_usd_price) + KV_SERIALIZE(paid_eth) + KV_SERIALIZE(eth_usd_price) + KV_SERIALIZE(paid_btc) + KV_SERIALIZE(btc_usd_price) + KV_SERIALIZE(address_this) + KV_SERIALIZE_N(amount_this_coin_fl, "amount_this") + KV_SERIALIZE(this_usd_price) + END_KV_SERIALIZE_MAP() + }; + struct genesis_config_json_struct + { + std::list payments; + std::string proof_string; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(payments) + KV_SERIALIZE(proof_string) + END_KV_SERIALIZE_MAP() + }; + + + //--------------------------------------------------------------- bool construct_miner_tx(size_t height, size_t median_size, const boost::multiprecision::uint128_t& already_generated_coins, size_t current_block_size, uint64_t fee,