diff --git a/tests/core_tests/wallet_tools.cpp b/tests/core_tests/wallet_tools.cpp index 754304b8a..17fbb2719 100644 --- a/tests/core_tests/wallet_tools.cpp +++ b/tests/core_tests/wallet_tools.cpp @@ -13,7 +13,7 @@ using namespace cryptonote; void wallet_accessor_test::set_account(tools::wallet2 * wallet, cryptonote::account_base& account) { wallet->clear(); - wallet->m_account = account; + // wallet->m_account = account; wallet->m_key_device_type = account.get_device().get_type(); wallet->m_account_public_address = account.get_keys().m_account_address; diff --git a/tests/unit_tests/carrot_impl.cpp b/tests/unit_tests/carrot_impl.cpp index 6318a51f0..5bbddf957 100644 --- a/tests/unit_tests/carrot_impl.cpp +++ b/tests/unit_tests/carrot_impl.cpp @@ -158,6 +158,7 @@ static void subtest_multi_account_transfer_over_transaction(const unittest_trans make_carrot_transaction_proposal_v1_transfer(normal_payment_proposals, selfsend_payment_proposals, tx_preproposal.fee_per_weight, + 5, tx_preproposal.extra_extra, make_fake_input_selection_callback(), ss_keys.carrot_account_spend_pubkey, diff --git a/tests/unit_tests/json_serialization.cpp b/tests/unit_tests/json_serialization.cpp index d75efb968..3df9c53ea 100644 --- a/tests/unit_tests/json_serialization.cpp +++ b/tests/unit_tests/json_serialization.cpp @@ -57,7 +57,7 @@ namespace test auto const& key = boost::get(input.value().target); actual_sources.push_back( - {{}, 0, key_field.pub_key, {}, std::size_t(input.index()), input.value().amount, rct, rct::identity()} + {{}, 0, key_field.pub_key, {}, std::size_t(input.index()), input.value().amount, rct, false, false, rct::identity()} ); for (unsigned ring = 0; ring < 10; ++ring) diff --git a/tests/unit_tests/tx_construction_helpers.cpp b/tests/unit_tests/tx_construction_helpers.cpp index 8a9d73fe3..af3596b4a 100644 --- a/tests/unit_tests/tx_construction_helpers.cpp +++ b/tests/unit_tests/tx_construction_helpers.cpp @@ -407,6 +407,7 @@ cryptonote::transaction construct_carrot_pruned_transaction_fake_inputs( normal_payment_proposals, selfsend_payment_proposals, fake_fee_per_weight, + 5, /*extra=*/{}, std::move(select_inputs), acc_keys.m_account_address.m_spend_public_key, diff --git a/tests/unit_tests/wallet_scanning.cpp b/tests/unit_tests/wallet_scanning.cpp index 72a2e0b06..03ffb89c0 100644 --- a/tests/unit_tests/wallet_scanning.cpp +++ b/tests/unit_tests/wallet_scanning.cpp @@ -159,9 +159,11 @@ TEST(wallet_scanning, view_scan_long_payment_id) // call view_incoming_scan_transaction with no meaningful key nor subaddresses maps, // just with the proper ECDH std::vector> enote_scan_infos(tx.vout.size()); + tools::keystore keystore; tools::wallet::view_incoming_scan_transaction(tx, bob.get_keys(), - {{bob_main_spend_pubkey, {}}}, // use a fake subaddress map with just the provided address in it + // {{bob_main_spend_pubkey, {}}}, use a fake subaddress map with just the provided address in it + keystore, epee::to_mut_span(enote_scan_infos)); bool matched = false; @@ -236,9 +238,11 @@ TEST(wallet_scanning, view_scan_short_payment_id) // call view_incoming_scan_transaction with no meaningful key nor subaddresses maps, // just with the proper ECDH std::vector> enote_scan_infos(tx.vout.size()); + tools::keystore keystore; tools::wallet::view_incoming_scan_transaction(tx, bob.get_keys(), - {{bob_main_spend_pubkey, {}}}, // use a fake subaddress map with just the provided address in it + // {{bob_main_spend_pubkey, {}}}, // use a fake subaddress map with just the provided address in it + keystore, epee::to_mut_span(enote_scan_infos)); bool matched = false; diff --git a/tests/unit_tests/wallet_tx_builder.cpp b/tests/unit_tests/wallet_tx_builder.cpp index 0248bbf6a..5f12ab662 100644 --- a/tests/unit_tests/wallet_tx_builder.cpp +++ b/tests/unit_tests/wallet_tx_builder.cpp @@ -160,16 +160,15 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_transfer_1) const uint64_t top_block_index = std::max(transfers.front().m_block_height, transfers.back().m_block_height) + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE; + tools::wallet2 w; const std::vector tx_proposals = tools::wallet::make_carrot_transaction_proposals_wallet2_transfer( - transfers, - {{alice.get_keys().m_account_address.m_spend_public_key, {}}}, + w, dsts, /*fee_per_weight=*/1, + 5, /*extra=*/{}, /*subaddr_account=*/0, /*subaddr_indices=*/{}, - /*ignore_above=*/MONEY_SUPPLY, - /*ignore_below=*/0, {}, top_block_index); @@ -223,16 +222,15 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_transfer_2) carrot::mock::convert_destination_v1(bob.cryptonote_address(), out_amount) }; + tools::wallet2 w; const std::vector tx_proposals = tools::wallet::make_carrot_transaction_proposals_wallet2_transfer( - transfers, - alice.subaddress_map_cn(), + w, dsts, /*fee_per_weight=*/1, + 5, /*extra=*/{}, /*subaddr_account=*/spending_subaddr_account, /*subaddr_indices=*/{}, - /*ignore_above=*/MONEY_SUPPLY, - /*ignore_below=*/0, {}, top_block_index); @@ -298,6 +296,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_1) /*is_subaddress=*/false, /*n_dests_per_tx=*/1, /*fee_per_weight=*/1, + 5, /*extra=*/{}, transfers.front().m_block_height + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE); ASSERT_EQ(1, tx_proposals.size()); @@ -332,6 +331,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_2) /*is_subaddress=*/false, /*n_dests_per_tx=*/FCMP_PLUS_PLUS_MAX_OUTPUTS - 1, /*fee_per_weight=*/1, + 5, /*extra=*/{}, transfers.front().m_block_height + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE); ASSERT_EQ(1, tx_proposals.size()); @@ -374,6 +374,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_3) /*is_subaddress=*/false, /*n_dests_per_tx=*/FCMP_PLUS_PLUS_MAX_OUTPUTS, /*fee_per_weight=*/1, + 5, /*extra=*/{}, transfers.front().m_block_height + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE); ASSERT_EQ(1, tx_proposals.size()); @@ -449,6 +450,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_4) /*is_subaddress=*/false, /*n_dests_per_tx=*/n_dests_per_tx, /*fee_per_weight=*/1, + 5, /*extra=*/{}, top_block_index); ASSERT_EQ(4, tx_proposals.size()); @@ -530,6 +532,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_5) /*is_subaddress=*/false, /*n_dests_per_tx=*/n_dests_per_tx, /*fee_per_weight=*/1, + 5, /*extra=*/{}, top_block_index); ASSERT_EQ(8, tx_proposals.size()); @@ -614,6 +617,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_6) /*is_subaddress=*/false, /*n_dests_per_tx=*/n_dests_per_tx, /*fee_per_weight=*/1, + 5, /*extra=*/{}, top_block_index); ASSERT_EQ(1, tx_proposals.size());