1
0
Fork 0
forked from lthn/blockchain

got rid of warnings

This commit is contained in:
cryptozoidberg 2024-01-28 19:40:34 +01:00
parent ca9f44967d
commit 1be00ea3c8
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
8 changed files with 4 additions and 17 deletions

View file

@ -205,7 +205,7 @@ namespace crypto
TRY_ENTRY() TRY_ENTRY()
{ {
DBG_PRINT("zarcanum_verify_proof"); DBG_PRINT("zarcanum_verify_proof");
bool r = false; //bool r = false;
//std::cout << "===== zarcanum_verify_proof =====" << ENDL //std::cout << "===== zarcanum_verify_proof =====" << ENDL
// << "m: " << m << ENDL // << "m: " << m << ENDL

View file

@ -2711,7 +2711,6 @@ bool blockchain_storage::get_target_outs_for_amount_prezarcanum(const COMMAND_RP
{ {
std::set<size_t> used; std::set<size_t> used;
used.insert(details.own_global_index); used.insert(details.own_global_index);
size_t try_count = 0;
for (uint64_t j = 0; j != decoys_count || used.size() >= up_index_limit;) for (uint64_t j = 0; j != decoys_count || used.size() >= up_index_limit;)
{ {
size_t g_index_initial = crypto::rand<size_t>() % up_index_limit; size_t g_index_initial = crypto::rand<size_t>() % up_index_limit;

View file

@ -129,7 +129,6 @@ namespace currency
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
bool verify_asset_surjection_proof(const transaction& tx, const crypto::hash& tx_id) bool verify_asset_surjection_proof(const transaction& tx, const crypto::hash& tx_id)
{ {
bool r = false;
if (tx.version <= TRANSACTION_VERSION_PRE_HF4) if (tx.version <= TRANSACTION_VERSION_PRE_HF4)
return true; return true;

View file

@ -1053,7 +1053,7 @@ namespace tools
{ {
WALLET_RPC_BEGIN_TRY_ENTRY(); WALLET_RPC_BEGIN_TRY_ENTRY();
std::string buff = epee::string_encoding::base64_decode(req.buff); std::string buff = epee::string_encoding::base64_decode(req.buff);
bool r = w.get_wallet()->encrypt_buffer(buff, res.res_buff); w.get_wallet()->encrypt_buffer(buff, res.res_buff);
res.res_buff = epee::string_encoding::base64_encode(res.res_buff); res.res_buff = epee::string_encoding::base64_encode(res.res_buff);
return true; return true;
WALLET_RPC_CATCH_TRY_ENTRY(); WALLET_RPC_CATCH_TRY_ENTRY();
@ -1063,7 +1063,7 @@ namespace tools
{ {
WALLET_RPC_BEGIN_TRY_ENTRY(); WALLET_RPC_BEGIN_TRY_ENTRY();
std::string buff = epee::string_encoding::base64_decode(req.buff); std::string buff = epee::string_encoding::base64_decode(req.buff);
bool r = w.get_wallet()->encrypt_buffer(buff, res.res_buff); w.get_wallet()->encrypt_buffer(buff, res.res_buff);
res.res_buff = epee::string_encoding::base64_encode(res.res_buff); res.res_buff = epee::string_encoding::base64_encode(res.res_buff);
return true; return true;
WALLET_RPC_CATCH_TRY_ENTRY(); WALLET_RPC_CATCH_TRY_ENTRY();

View file

@ -1193,8 +1193,6 @@ namespace
bool init_output_indices(map_output_idx_t& outs, map_output_t& outs_mine, const std::vector<currency::block>& blockchain, const map_hash2tx_t& mtx, const currency::account_keys& acc_keys) bool init_output_indices(map_output_idx_t& outs, map_output_t& outs_mine, const std::vector<currency::block>& blockchain, const map_hash2tx_t& mtx, const currency::account_keys& acc_keys)
{ {
bool r = false;
for (const block& blk : blockchain) for (const block& blk : blockchain)
{ {
uint64_t height = get_block_height(blk); uint64_t height = get_block_height(blk);
@ -2338,7 +2336,6 @@ bool shuffle_source_entries(std::vector<tx_source_entry>& sources)
// creates destinations.size() + 1 outputs if the total sum of amounts is less than the original premine amount (the last one will have amount = old_premine - sum) // creates destinations.size() + 1 outputs if the total sum of amounts is less than the original premine amount (the last one will have amount = old_premine - sum)
bool replace_coinbase_in_genesis_block(const std::vector<currency::tx_destination_entry>& destinations, test_generator& generator, std::vector<test_event_entry>& events, currency::block& genesis_block) bool replace_coinbase_in_genesis_block(const std::vector<currency::tx_destination_entry>& destinations, test_generator& generator, std::vector<test_event_entry>& events, currency::block& genesis_block)
{ {
bool r = false;
generator.remove_block_info(genesis_block); generator.remove_block_info(genesis_block);
events.pop_back(); events.pop_back();

View file

@ -375,7 +375,7 @@ bool ionic_swap_exact_amounts_test::c1(currency::core& c, size_t ev_index, const
CHECK_AND_ASSERT_MES(check_balance_via_wallet(*bob_wlt, "Bob", adb.total_max_supply, 0, adb.total_max_supply, 0, 0, asset_id), false, ""); CHECK_AND_ASSERT_MES(check_balance_via_wallet(*bob_wlt, "Bob", adb.total_max_supply, 0, adb.total_max_supply, 0, 0, asset_id), false, "");
CHECK_AND_ASSERT_MES(check_balance_via_wallet(*carol_wlt, "Carol", MK_TEST_COINS(21), 0, MK_TEST_COINS(21), 0, 0), false, ""); CHECK_AND_ASSERT_MES(check_balance_via_wallet(*carol_wlt, "Carol", MK_TEST_COINS(21), 0, MK_TEST_COINS(21), 0, 0), false, "");
size_t current_blockchain_size = c.get_current_blockchain_size(); //size_t current_blockchain_size = c.get_current_blockchain_size();
// Normal ionic swap between Alice and Bob: (Alice has only coins with explicit asset id) // Normal ionic swap between Alice and Bob: (Alice has only coins with explicit asset id)
// before: // before:

View file

@ -716,8 +716,6 @@ bool assets_and_pos_mining::generate(std::vector<test_event_entry>& events) cons
{ {
// Test idea: ensure that post-HF4 Zarcanum staking functions correctly with outputs that have a nonzero asset id blinding mask (i.e., outputs with a non-explicit asset id) // Test idea: ensure that post-HF4 Zarcanum staking functions correctly with outputs that have a nonzero asset id blinding mask (i.e., outputs with a non-explicit asset id)
bool r = false;
uint64_t ts = test_core_time::get_time(); uint64_t ts = test_core_time::get_time();
m_accounts.resize(TOTAL_ACCS_COUNT); m_accounts.resize(TOTAL_ACCS_COUNT);
account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts); account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts);

View file

@ -422,8 +422,6 @@ zarcanum_pos_block_math::zarcanum_pos_block_math()
bool zarcanum_pos_block_math::generate(std::vector<test_event_entry>& events) const bool zarcanum_pos_block_math::generate(std::vector<test_event_entry>& events) const
{ {
bool r = false;
GENERATE_ACCOUNT(miner_acc); GENERATE_ACCOUNT(miner_acc);
MAKE_GENESIS_BLOCK(events, blk_0, miner_acc, test_core_time::get_time()); MAKE_GENESIS_BLOCK(events, blk_0, miner_acc, test_core_time::get_time());
DO_CALLBACK(events, "configure_core"); // necessary to set m_hardforks DO_CALLBACK(events, "configure_core"); // necessary to set m_hardforks
@ -602,8 +600,6 @@ zarcanum_in_alt_chain::zarcanum_in_alt_chain()
bool zarcanum_in_alt_chain::generate(std::vector<test_event_entry>& events) const bool zarcanum_in_alt_chain::generate(std::vector<test_event_entry>& events) const
{ {
bool r = false;
uint64_t ts = test_core_time::get_time(); uint64_t ts = test_core_time::get_time();
m_accounts.resize(TOTAL_ACCS_COUNT); m_accounts.resize(TOTAL_ACCS_COUNT);
account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts); account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts);
@ -750,8 +746,6 @@ bool zarcanum_block_with_txs::generate(std::vector<test_event_entry>& events) co
{ {
// Test idea: make sure Zarcanum PoS block can have txs and the sum of fees is correctly added to the block reward // Test idea: make sure Zarcanum PoS block can have txs and the sum of fees is correctly added to the block reward
bool r = false;
uint64_t ts = test_core_time::get_time(); uint64_t ts = test_core_time::get_time();
m_accounts.resize(TOTAL_ACCS_COUNT); m_accounts.resize(TOTAL_ACCS_COUNT);
account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts); account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts);