diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 387bae9a3..45f9b0a8c 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -5055,7 +5055,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector &args_, bool ca uint64_t total_fee = 0; uint64_t dust_not_in_fee = 0; uint64_t dust_in_fee = 0; - uint64_t change = 0; for (size_t n = 0; n < ptx_vector.size(); ++n) { total_fee += ptx_vector[n].fee; for (auto i: ptx_vector[n].selected_transfers) total_sent += m_wallet->get_transfer_details(i).amount(); total_sent -= ptx_vector[n].change_dts.amount + ptx_vector[n].fee; - change += ptx_vector[n].change_dts.amount; if (ptx_vector[n].dust_added_to_fee) dust_in_fee += ptx_vector[n].dust; diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index cd8c38fd8..dc5847b74 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -9730,7 +9730,7 @@ void wallet2::transfer_selected(const std::vector sources; for(size_t idx: selected_transfers) { @@ -9749,7 +9749,6 @@ void wallet2::transfer_selected(const std::vector(outs[out_index][n]); src.outputs.push_back(oe); - ++i; } //paste real transaction to the random index @@ -9950,7 +9949,7 @@ void wallet2::transfer_selected_rct(std::vector sources; for(size_t idx: selected_transfers) { @@ -9973,7 +9972,6 @@ void wallet2::transfer_selected_rct(std::vector(outs[out_index][n]); src.outputs.push_back(oe); } - ++i; //paste real transaction to the random index auto it_to_replace = std::find_if(src.outputs.begin(), src.outputs.end(), [&](const tx_output_entry& a) @@ -12663,6 +12661,7 @@ bool wallet2::check_reserve_proof(const cryptonote::account_public_address &addr } catch(...) {} + THROW_WALLET_EXCEPTION_IF(!loaded, error::wallet_internal_error, "Failed to parse reserve proof signature data"); THROW_WALLET_EXCEPTION_IF(subaddr_spendkeys.count(address.m_spend_public_key) == 0, error::wallet_internal_error, "The given address isn't found in the proof"); diff --git a/tests/unit_tests/epee_levin_protocol_handler_async.cpp b/tests/unit_tests/epee_levin_protocol_handler_async.cpp index 65afc83f6..5a398517a 100644 --- a/tests/unit_tests/epee_levin_protocol_handler_async.cpp +++ b/tests/unit_tests/epee_levin_protocol_handler_async.cpp @@ -657,9 +657,6 @@ TEST_F(test_levin_protocol_handler__hanle_recv_with_invalid_data, handles_bad_cb m_req_head.m_cb = sizeof(epee::levin::bucket_head2); m_req_head.m_flags = LEVIN_PACKET_BEGIN; m_req_head.m_command = 0; - - epee::levin::bucket_head2 inner{}; - inner.m_cb = 2; m_in_data.resize(sizeof(epee::levin::bucket_head2)); prepare_buf();