mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #5502
25a7cfd
add a few checks where it seems appropriate (moneromooo-monero)1a66a86
remove unused code (moneromooo-monero)
This commit is contained in:
commit
e3de4aa68b
13 changed files with 10 additions and 15 deletions
|
@ -546,6 +546,7 @@ void block_tracker::global_indices(const cryptonote::transaction *tx, std::vecto
|
|||
void block_tracker::get_fake_outs(size_t num_outs, uint64_t amount, uint64_t global_index, uint64_t cur_height, std::vector<get_outs_entry> &outs){
|
||||
auto & vct = m_outs[amount];
|
||||
const size_t n_outs = vct.size();
|
||||
CHECK_AND_ASSERT_THROW_MES(n_outs > 0, "n_outs is 0");
|
||||
|
||||
std::set<size_t> used;
|
||||
std::vector<size_t> choices;
|
||||
|
|
|
@ -163,6 +163,7 @@ bool wallet_tools::fill_tx_sources(tools::wallet2 * wallet, std::vector<cryptono
|
|||
|
||||
void wallet_tools::gen_tx_src(size_t mixin, uint64_t cur_height, const tools::wallet2::transfer_details & td, cryptonote::tx_source_entry & src, block_tracker &bt)
|
||||
{
|
||||
CHECK_AND_ASSERT_THROW_MES(mixin != 0, "mixin is zero");
|
||||
src.amount = td.amount();
|
||||
src.rct = td.is_rct();
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ TEST(protocol_pack, protocol_pack_command)
|
|||
|
||||
cryptonote::NOTIFY_RESPONSE_CHAIN_ENTRY::request r2;
|
||||
res = epee::serialization::load_t_from_binary(r2, buff);
|
||||
ASSERT_TRUE(res);
|
||||
ASSERT_TRUE(r.m_block_ids.size() == i);
|
||||
ASSERT_TRUE(r.start_height == 1);
|
||||
ASSERT_TRUE(r.total_height == 3);
|
||||
|
|
|
@ -56,7 +56,6 @@ TEST(varint, equal)
|
|||
ASSERT_TRUE (bytes > 0 && bytes <= sizeof(buf));
|
||||
|
||||
uint64_t idx2;
|
||||
bufptr = buf;
|
||||
std::string s(buf, bytes);
|
||||
int read = tools::read_varint(s.begin(), s.end(), idx2);
|
||||
ASSERT_EQ (read, bytes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue