1
0
Fork 0
forked from lthn/blockchain

fix warnings (#546)

* fix warnings

* refactoring
This commit is contained in:
Dmitry Matsiukhov 2025-07-18 20:17:02 +03:00 committed by GitHub
parent 97b17221d9
commit 4695229f2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 46 additions and 70 deletions

View file

@ -826,7 +826,7 @@ bool handle_increment_build_no(po::variables_map& vm)
bool handle_update_maintainers_info(po::variables_map& vm)
{
log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL);
size_t rpc_port = RPC_DEFAULT_PORT;
[[maybe_unused]] size_t rpc_port = RPC_DEFAULT_PORT;
if(!command_line::has_arg(vm, arg_rpc_port))
{
std::cout << "ERROR: rpc port not set" << ENDL;

View file

@ -7101,7 +7101,7 @@ bool blockchain_storage::handle_block_to_main_chain(const block& bl, const crypt
if (!m_is_in_checkpoint_zone)
{
auto cleanup = [&](){
bool add_res = m_tx_pool.add_tx(tx, tvc, true, true);
m_tx_pool.add_tx(tx, tvc, true, true);
m_tx_pool.add_transaction_to_black_list(tx);
purge_block_data_from_blockchain(bl, tx_processed_count);
bvc.m_verification_failed = true;
@ -8102,7 +8102,7 @@ bool blockchain_storage::validate_alt_block_input(const transaction& input_tx,
for (size_t pk_n = 0; pk_n < pub_keys.size(); ++pk_n)
{
crypto::public_key& pk = pub_keys[pk_n];
[[maybe_unused]] crypto::public_key& pk = pub_keys[pk_n];
crypto::hash tx_id = null_hash;
uint64_t out_n = UINT64_MAX;
auto &off = abs_key_offsets[pk_n];

View file

@ -789,7 +789,6 @@ bool simple_wallet::save(const std::vector<std::string> &args)
//----------------------------------------------------------------------------------------------------
bool simple_wallet::process_ki_restoration()
{
bool r = false;
if (!m_restore_ki_in_wo_wallet.empty())
{
std::wstring wo_filename = epee::string_encoding::utf8_to_wstring(m_restore_ki_in_wo_wallet);
@ -941,7 +940,7 @@ void simple_wallet::on_transfer2(const tools::wallet_public::wallet_transfer_inf
", tx " << wti.tx_hash;
for (const auto& st : wti.subtransfers)
{
epee::log_space::console_colors color = st.is_income ? epee::log_space::console_color_green : epee::log_space::console_color_magenta;
[[maybe_unused]] epee::log_space::console_colors color = st.is_income ? epee::log_space::console_color_green : epee::log_space::console_color_magenta;
uint64_t decimal_points = CURRENCY_DISPLAY_DECIMAL_POINT;
std::string token_info = get_token_info_string(st.asset_id, decimal_points);
@ -1174,7 +1173,7 @@ std::string wti_to_text_line(const tools::wallet_public::wallet_transfer_info& w
//----------------------------------------------------------------------------------------------------
bool simple_wallet::export_recent_transfers(const std::vector<std::string>& args)
{
bool export_to_json = true;
[[maybe_unused]] bool export_to_json = true;
bool ignore_pos = false;
if (args.size() > 1)
{
@ -2718,7 +2717,6 @@ bool simple_wallet::sweep_bare_outs(const std::vector<std::string> &args)
{
CONFIRM_WITH_PASSWORD();
SIMPLE_WALLET_BEGIN_TRY_ENTRY();
bool r = false;
if (args.size() > 1)
{
@ -3070,7 +3068,7 @@ int seed_doctor()
}
bool pass_protected = false;
bool success = account_base::is_seed_password_protected(seed, pass_protected);
account_base::is_seed_password_protected(seed, pass_protected);
success_msg_writer() << "SECURED_SEED: " << (pass_protected ? "true" : "false");
if (pass_protected)
@ -3176,7 +3174,7 @@ int seed_doctor()
success_msg_writer() << "No address and no checksum, recovery is limited only to date reset";
std::string result = boost::algorithm::join(words, " ");
account_base acc;
bool r = acc.restore_from_seed_phrase(result, passphrase);
acc.restore_from_seed_phrase(result, passphrase);
success_msg_writer() << "Potential seed candidate:\n" << result << "\nAddress: " << acc.get_public_address_str();
return EXIT_FAILURE;
}

View file

@ -6825,8 +6825,8 @@ bool wallet2::prepare_tx_sources(size_t fake_outputs_count_, bool use_all_decoys
if (true)
{
size_t fake_outputs_count = fake_outputs_count_;
uint64_t zarcanum_start_from = m_core_runtime_config.hard_forks.m_height_the_hardfork_n_active_after[ZANO_HARDFORK_04_ZARCANUM];
uint64_t current_size = m_chain.get_blockchain_current_size();
[[maybe_unused]] uint64_t zarcanum_start_from = m_core_runtime_config.hard_forks.m_height_the_hardfork_n_active_after[ZANO_HARDFORK_04_ZARCANUM];
[[maybe_unused]] uint64_t current_size = m_chain.get_blockchain_current_size();
bool need_to_request = fake_outputs_count != 0;
COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS3::request req = AUTO_VAL_INIT(req);

View file

@ -2551,7 +2551,7 @@ bool generate_pos_block_with_extra_nonce(test_generator& generator, const std::v
if (generator.get_hardforks().is_hardfork_active_for_height(ZANO_HARDFORK_04_ZARCANUM, height))
{
std::vector<tx_source_entry> sources;
bool ok = fill_tx_sources(
fill_tx_sources(
sources, events, prev_block, miner.get_keys(),
UINT64_MAX, 0, false, false, true
);

View file

@ -96,7 +96,7 @@ bool gen_double_spend_in_tx<txs_kept_by_block>::generate(std::vector<test_event_
currency::transaction tx_1 = AUTO_VAL_INIT(tx_1);
std::vector<currency::attachment_v> attachments;
size_t tx_hardfork_id{};
uint64_t tx_version = get_tx_version_from_events(events);
uint64_t tx_version = this->get_tx_version_from_events(events);
if (!construct_tx(bob_account.get_keys(), sources, destinations, attachments, tx_1, tx_version, tx_hardfork_id, uint64_t(0)))
return false;

View file

@ -227,8 +227,6 @@ bool hardfork_4_wallet_transfer_with_mandatory_mixins::generate(std::vector<test
* (It should also work prior to HF4.)
*/
bool r = false;
uint64_t ts = test_core_time::get_time();
m_accounts.resize(TOTAL_ACCS_COUNT);
account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts);
@ -441,7 +439,6 @@ bool hardfork_4_pop_tx_from_global_index::generate(std::vector<test_event_entry>
bool hardfork_4_pop_tx_from_global_index::c1(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events)
{
auto& bcs = c.get_blockchain_storage();
bool r = false;
//currency::outs_index_stat outs_stat{};
//bcs.get_outs_index_stat(outs_stat); // 24 - bad, 22 - good

View file

@ -1469,8 +1469,6 @@ bool eth_signed_asset_basics::c1(currency::core& c, size_t ev_index, const std::
crypto::public_key asset_id = currency::null_pkey;
miner_wlt->deploy_new_asset(adb, destinations, ft, asset_id);
const transaction& tx = ft.tx;
LOG_PRINT_L0("Deployed new asset: " << asset_id << ", tx_id: " << ft.tx_id);
CHECK_AND_ASSERT_MES(c.get_pool_transactions_count() == 1, false, "Unexpected number of txs in the pool: " << c.get_pool_transactions_count());
@ -2122,7 +2120,7 @@ bool asset_current_and_total_supplies_comparative_constraints::generate(std::vec
std::vector<tx_destination_entry> destinations{};
const auto& ado{m_ados_register.at(asset_position::gamma)};
crypto::secret_key one_time{};
size_t hf_n = m_hardforks.get_the_most_recent_hardfork_id_for_height(get_block_height(blk_1r));
//size_t hf_n = m_hardforks.get_the_most_recent_hardfork_id_for_height(get_block_height(blk_1r));
//fill_ado_version_based_onhardfork(ado, hf_n);
//fill_adb_version_based_onhardfork(*ado.opt_descriptor, hf_n);
@ -2148,7 +2146,7 @@ bool asset_current_and_total_supplies_comparative_constraints::generate(std::vec
std::vector<tx_destination_entry> destinations{};
crypto::secret_key one_time{};
const auto& ado{m_ados_register.at(asset_position::alpha)};
size_t hf_n = m_hardforks.get_the_most_recent_hardfork_id_for_height(get_block_height(blk_2r));
//size_t hf_n = m_hardforks.get_the_most_recent_hardfork_id_for_height(get_block_height(blk_2r));
//fill_ado_version_based_onhardfork(ado, hf_n);
//fill_adb_version_based_onhardfork(*ado.opt_descriptor, hf_n);
@ -2173,7 +2171,7 @@ bool asset_current_and_total_supplies_comparative_constraints::generate(std::vec
std::vector<tx_destination_entry> destinations{};
crypto::secret_key one_time{};
const auto& ado{m_ados_register.at(asset_position::beta)};
size_t hf_n = m_hardforks.get_the_most_recent_hardfork_id_for_height(get_block_height(blk_2r));
//size_t hf_n = m_hardforks.get_the_most_recent_hardfork_id_for_height(get_block_height(blk_2r));
//fill_ado_version_based_onhardfork(ado, hf_n);
//fill_adb_version_based_onhardfork(*ado.opt_descriptor, hf_n);
@ -2210,7 +2208,6 @@ bool asset_current_and_total_supplies_comparative_constraints::generate(std::vec
const auto& ado_register{m_ados_register.at(asset_position::beta)};
std::vector<tx_source_entry> sources{};
std::vector<tx_destination_entry> destinations{};
crypto::secret_key one_time{};
tx_source_entry source{};
finalize_tx_param ftp{};
finalized_tx ftx{};
@ -2452,8 +2449,6 @@ bool several_asset_emit_burn_txs_in_pool::generate(std::vector<test_event_entry>
bool several_asset_emit_burn_txs_in_pool::c1(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events)
{
bool r = false;
std::shared_ptr<tools::wallet2> miner_wlt = init_playtime_test_wallet(events, c, MINER_ACC_IDX);
miner_wlt->refresh();
std::shared_ptr<tools::wallet2> alice_wlt = init_playtime_test_wallet(events, c, ALICE_ACC_IDX);
@ -2614,7 +2609,6 @@ bool assets_transfer_with_smallest_amount::generate(std::vector<test_event_entry
// Only for HF >= 4
//
bool r = false;
uint64_t ts = test_core_time::get_time();
m_accounts.resize(TOTAL_ACCS_COUNT);
account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts);
@ -2947,7 +2941,6 @@ bool asset_operations_and_chain_switching::generate(std::vector<test_event_entry
bool asset_operations_and_chain_switching::c1(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events)
{
bool r = false, stub = false;;
std::shared_ptr<tools::wallet2> alice_wlt = init_playtime_test_wallet(events, c, m_accounts[ALICE_ACC_IDX]);
alice_wlt->refresh();
std::shared_ptr<tools::wallet2> bob_wlt = init_playtime_test_wallet(events, c, m_accounts[BOB_ACC_IDX]);
@ -2962,7 +2955,7 @@ bool asset_operations_and_chain_switching::c1(currency::core& c, size_t ev_index
bool asset_operations_and_chain_switching::c2(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events)
{
bool r = false, stub = false;;
bool r = false;
std::shared_ptr<tools::wallet2> alice_wlt = init_playtime_test_wallet(events, c, m_accounts[ALICE_ACC_IDX]);
alice_wlt->refresh();
std::shared_ptr<tools::wallet2> bob_wlt = init_playtime_test_wallet(events, c, m_accounts[BOB_ACC_IDX]);
@ -2984,7 +2977,7 @@ bool asset_operations_and_chain_switching::c2(currency::core& c, size_t ev_index
bool asset_operations_and_chain_switching::c3(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events)
{
bool r = false, stub = false;;
bool r = false;
std::shared_ptr<tools::wallet2> alice_wlt = init_playtime_test_wallet(events, c, m_accounts[ALICE_ACC_IDX]);
alice_wlt->refresh();
std::shared_ptr<tools::wallet2> bob_wlt = init_playtime_test_wallet(events, c, m_accounts[BOB_ACC_IDX]);

View file

@ -1651,6 +1651,7 @@ bool tx_version_against_hardfork::generate(std::vector<test_event_entry>& events
{
case ZANO_HARDFORK_04_ZARCANUM:
tx_hardfork_id = 0;
[[fallthrough]];
case ZANO_HARDFORK_05:
tx_version_good = TRANSACTION_VERSION_POST_HF4;
tx_version_bad = TRANSACTION_VERSION_PRE_HF4;
@ -2568,7 +2569,6 @@ bool input_refers_to_incompatible_by_type_output::assert_zc_input_refers_bare_ou
}
{
bool all_inputs_have_explicit_native_asset_id{};
blockchain_storage::check_tx_inputs_context ctic{};
CHECK_AND_ASSERT_EQ(c.get_blockchain_storage().check_tx_input(tx, 0, boost::get<const txin_zc_input>(tx.vin.front()), get_transaction_hash(tx), ctic), false);

View file

@ -829,7 +829,6 @@ bool wallet_true_rpc_pos_mining::generate(std::vector<test_event_entry>& events)
bool wallet_true_rpc_pos_mining::c1(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events)
{
bool r = false;
std::shared_ptr<tools::wallet2> miner_wlt = init_playtime_test_wallet_with_true_http_rpc(events, c, MINER_ACC_IDX);
std::shared_ptr<tools::wallet2> alice_wlt = init_playtime_test_wallet_with_true_http_rpc(events, c, ALICE_ACC_IDX);

View file

@ -3799,7 +3799,6 @@ bool wallet_and_sweep_below::generate(std::vector<test_event_entry>& events) con
bool wallet_and_sweep_below::c1(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events)
{
bool r = false;
std::shared_ptr<tools::wallet2> miner_wlt = init_playtime_test_wallet(events, c, MINER_ACC_IDX);
uint64_t miner_balance = (3 * CURRENCY_MINED_MONEY_UNLOCK_WINDOW - 1) * COIN;
@ -3960,14 +3959,12 @@ bool wallet_reorganize_and_trim_test::c1(currency::core& c, size_t ev_index, con
mine_next_pow_blocks_in_playtime(m_accounts[MINER_ACC_IDX].get_public_address(), c, 2);
mine_next_pow_blocks_in_playtime(m_accounts[MINER_ACC_IDX].get_public_address(), c, WALLET_REORGANIZE_AND_TRIM_TEST_REORG_SIZE);
uint64_t h1 = c.get_blockchain_storage().get_top_block_height();
miner_wlt->refresh();
uint64_t unlocked = 0;
uint64_t total = miner_wlt->balance(unlocked);
c.get_blockchain_storage().truncate_blockchain(c.get_blockchain_storage().get_top_block_height() - (WALLET_REORGANIZE_AND_TRIM_TEST_REORG_SIZE-1));
mine_next_pow_blocks_in_playtime(m_accounts[MINER_ACC_IDX].get_public_address(), c, 10);
uint64_t h2 = c.get_blockchain_storage().get_top_block_height();
miner_wlt->refresh();
uint64_t unlocked2 = 0;
uint64_t total2 = miner_wlt->balance(unlocked2);

View file

@ -690,12 +690,12 @@ size_t find_pos_hash(const boost::multiprecision::uint256_t& L_div_D, const curr
TEST(crypto, pos)
{
//scalar_t D = 10000000000000001u;
scalar_t D = 13042196742415129u; // prime number
currency::wide_difficulty_type D_w = D.as_boost_mp_type<boost::multiprecision::uint256_t>().convert_to<currency::wide_difficulty_type>();
uint64_t amount = 1000000000000;
size_t count_old = 0;
size_t count_new = 0;
size_t count_3 = 0;
[[maybe_unused]] scalar_t D = 13042196742415129u; // prime number
[[maybe_unused]] currency::wide_difficulty_type D_w = D.as_boost_mp_type<boost::multiprecision::uint256_t>().convert_to<currency::wide_difficulty_type>();
[[maybe_unused]] uint64_t amount = 1000000000000;
[[maybe_unused]] size_t count_old = 0;
[[maybe_unused]] size_t count_new = 0;
[[maybe_unused]] size_t count_3 = 0;
scalar_t x;
x.make_random();
@ -704,14 +704,14 @@ TEST(crypto, pos)
const boost::multiprecision::uint256_t c_L_w = c_scalar_L.as_boost_mp_type<boost::multiprecision::uint256_t>();
const boost::multiprecision::uint256_t c_L_div_D_w = c_L_w / D_w;
boost::multiprecision::uint512_t h_tres = c_L_div_D_w * amount;
[[maybe_unused]] boost::multiprecision::uint512_t h_tres = c_L_div_D_w * amount;
currency::wide_difficulty_type final_diff = D_w / amount;
[[maybe_unused]] currency::wide_difficulty_type final_diff = D_w / amount;
boost::multiprecision::uint512_t Lv = boost::multiprecision::uint512_t(c_L_w) * amount;
[[maybe_unused]] boost::multiprecision::uint512_t Lv = boost::multiprecision::uint512_t(c_L_w) * amount;
constexpr uint64_t c_coin = 1000000000000;
const uint64_t amounts[] = {
[[maybe_unused]] const uint64_t amounts[] = {
c_coin / 100,
c_coin / 50,
c_coin / 20,
@ -738,9 +738,9 @@ TEST(crypto, pos)
c_coin * 500000
};
uint64_t kernel = 0;
scalar_t d0 = 0;
uint64_t d1 = 0;
[[maybe_unused]] uint64_t kernel = 0;
[[maybe_unused]] scalar_t d0 = 0;
[[maybe_unused]] uint64_t d1 = 0;
/*
@ -1064,7 +1064,8 @@ TEST(crypto, hp)
TEST(perf, cn_fast_hash)
{
//return true;
const crypto::hash h_initial = *(crypto::hash*)(&scalar_t::random());
scalar_t s_rnd = scalar_t::random();
const crypto::hash h_initial = *(crypto::hash*)(&s_rnd);
std::vector<std::vector<uint8_t>> test_data;
test_data.push_back(std::vector<uint8_t>(32, 0));
@ -1631,8 +1632,8 @@ TEST(crypto, schnorr_sig)
{
public_key invalid_pk = parse_tpod_from_hex_string<public_key>("0000000000000000000000000000000000000000000000000000000000000001");
ASSERT_FALSE(check_key(invalid_pk));
hash m = *(crypto::hash*)(&scalar_t::random());
scalar_t s_rnd = scalar_t::random();
hash m = *(crypto::hash*)(&s_rnd);
for(size_t i = 0; i < 100; ++i)
{
generic_schnorr_sig_s ss{};

View file

@ -219,8 +219,6 @@ TEST(clsag, bad_sig)
TEST(clsag, sig_difference)
{
int cmp_res = 0;
clsag_gg_sig_check_t cc0, cc1;
cc0.prepare_random_data(8);
cc1 = cc0; // get the same input data

View file

@ -344,7 +344,8 @@ TEST(perf, primitives)
p = p + p;
}
ge_p3 Q;
ge_scalarmult_base(&Q, &scalar_t::random().m_s[0]);
scalar_t s_rnd = scalar_t::random();
ge_scalarmult_base(&Q, &s_rnd.m_s[0]);
std::vector<ge_p1p1> results(rnd_indecies.size());
t.start();
@ -1109,8 +1110,6 @@ struct pme_runner_t : public pme_runner_i
TEST(perf, msm)
{
bool r = false;
std::deque<std::unique_ptr<pme_runner_i>> runners;
//runners.emplace_front(std::make_unique< pme_runner_t<128, bpp_crypto_trait_Zarcanum, mes_msm_and_check_zero_pippenger_v1> >("Zarcanum, BPPE, 128", 1));
//runners.emplace_front(std::make_unique< pme_runner_t<128, bpp_crypto_trait_Zarcanum, mes_msm_and_check_zero_pippenger_v1> >("Zarcanum, BPPE, 128", 2));

View file

@ -352,7 +352,7 @@ TEST(bppe, power_128)
std::vector<point_t>& commitments = commitments_vector.back();
scalar_vec_t masks, masks2;
for(auto& el: values)
for (size_t i = 0; i < values.size(); ++i)
{
masks.emplace_back(scalar_t::random());
masks2.emplace_back(scalar_t::random());

View file

@ -236,7 +236,6 @@ void perform_simulation_for_function(const std::map<uint64_t, uint64_t>& timesta
std::vector<currency::wide_difficulty_type> backward_cumul_difficulties;
backward_cumul_difficulties.reserve(BBR_DIFFICULTY_WINDOW);
std::copy(cumul_difficulties.rbegin(), cumul_difficulties.rbegin() + BBR_DIFFICULTY_WINDOW - 1, std::back_inserter(backward_cumul_difficulties));
uint64_t ts = timestamps.back();
curren_difficulty = cb(backward_timestamps, backward_cumul_difficulties, BBR_DIFFICULTY_TARGET);
}
cumul_difficulties.push_back(cumul_difficulties.back() + curren_difficulty);
@ -357,7 +356,7 @@ void hash_rate_analysis(const std::string& path)
uint64_t curren_hashrate = 0;
uint64_t step = 10;
uint64_t hash_rate_range = 10;
uint64_t second_windowf_or_hashrate = 20*60;
// uint64_t second_windowf_or_hashrate = 20*60;
for (size_t i = hash_rate_range; i != blocks.size(); i++)
{

View file

@ -19,7 +19,7 @@ int test_get_rand_outs()
m_core_proxy->set_connection_addr("127.0.0.1:11211");
m_core_proxy->check_connection();
bool r = m_core_proxy->call_COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS(req, rsp);
m_core_proxy->call_COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS(req, rsp);
return 0;
}

View file

@ -41,9 +41,8 @@ bool perform_crypt_stream_iteration(const std::list<currency::block_extended_inf
in.push(data_file);
try {
bool res2 = tools::portable_unserialize_obj_from_stream(verification_list, in);
tools::portable_unserialize_obj_from_stream(verification_list, in);
CHECK_AND_ASSERT_MES(res, false, "Failed to unserialize wallet");
size_t i = 0;
CHECK_AND_ASSERT_MES(test_list.size() == verification_list.size(), false, "restored list is wrong size");
return true;
}
@ -81,9 +80,8 @@ bool perform_just_substream_stream_iteration(const std::list<currency::block_ext
in.push(data_file);
try {
bool res2 = tools::portable_unserialize_obj_from_stream(verification_list, in);
tools::portable_unserialize_obj_from_stream(verification_list, in);
CHECK_AND_ASSERT_MES(res, false, "Failed to unserialize wallet");
size_t i = 0;
CHECK_AND_ASSERT_MES(test_list.size() == verification_list.size(), false, "restored list is wrong size");
return true;
}
@ -122,9 +120,8 @@ bool perform_no_crypt_stream_iteration(const std::list<currency::block_extended_
// in.push(data_file);
try {
bool res2 = tools::portable_unserialize_obj_from_stream(verification_list, data_file);
tools::portable_unserialize_obj_from_stream(verification_list, data_file);
CHECK_AND_ASSERT_MES(res, false, "Failed to unserialize wallet");
size_t i = 0;
CHECK_AND_ASSERT_MES(test_list.size() == verification_list.size(), false, "restored list is wrong size");
return true;
}

View file

@ -62,7 +62,7 @@ void parse_weird_tx()
std::string tx_blob;
epee::string_tools::parse_hexstr_to_binbuff(tx_hex_buff, tx_blob);
currency::transaction tx;
bool r = currency::parse_and_validate_tx_from_blob(tx_blob, tx);
currency::parse_and_validate_tx_from_blob(tx_blob, tx);
std::string res_hash = epee::string_tools::pod_to_hex(currency::get_transaction_hash(tx));
if (res_hash != expected_hash)
{

View file

@ -47,7 +47,7 @@ void test_base64_serialization()
epee::serialization::store_t_to_json(rsp, str_json);
currency::COMMAND_RPC_GET_POOL_TXS_DETAILS::response rsp2;
bool res = epee::serialization::load_t_from_json(rsp2, str_json);
epee::serialization::load_t_from_json(rsp2, str_json);
if (rsp.txs.back().blob != rsp2.txs.back().blob)
{
LOG_PRINT_L0("Troubles");

View file

@ -38,7 +38,7 @@ TEST(chacha_stream_test, basic_test_with_serialization_on_top)
//out << buff;
bool res = tools::portble_serialize_obj_to_stream(test_list, out);
tools::portble_serialize_obj_to_stream(test_list, out);
out.flush();
store_data_file.close();

View file

@ -8,7 +8,7 @@
TEST(decoy_selection_test, decoy_selection_test)
{
const uint64_t test_scale_size = 20000;
// const uint64_t test_scale_size = 20000;
decoy_selection_generator dsg;
dsg.init(100);
std::map<uint64_t, uint64_t> hits;

View file

@ -443,8 +443,6 @@ TEST(multiassets, native_serialization_get_or_calculate_asset_id_undefined)
'\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x97', '\x9e', '\xb7', '\x06', '\xac', '\xe2', '\xeb', '\x83', '\xf9', '\x12', 'V', 'X', '\xb2', '?', '\xb3', 'R', ' ',
'\x84', '\x80', '\xcb', ';', '\x90', '\xc4', '>', '-', '\xf0', '\xd2', '\x98', '\xf9', 'u', 'N', '\xbc'};
crypto::point_t expected_point_asset_id{};
crypto::public_key expected_asset_id{};
crypto::point_t calculated_point_asset_id{};
crypto::public_key calculated_asset_id{};
const std::optional ado{deserialize<currency::asset_descriptor_operation>(serialization_method::native, serialized_ado)};