carrot+fcmp: PR #32 j-berman review 1
This commit is contained in:
@@ -171,8 +171,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_transfer_1)
|
||||
/*ignore_above=*/MONEY_SUPPLY,
|
||||
/*ignore_below=*/0,
|
||||
{},
|
||||
top_block_index,
|
||||
alice.get_keys());
|
||||
top_block_index);
|
||||
|
||||
ASSERT_EQ(1, tx_proposals.size());
|
||||
const carrot::CarrotTransactionProposalV1 tx_proposal = tx_proposals.at(0);
|
||||
@@ -235,8 +234,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_transfer_2)
|
||||
/*ignore_above=*/MONEY_SUPPLY,
|
||||
/*ignore_below=*/0,
|
||||
{},
|
||||
top_block_index,
|
||||
alice.legacy_acb.get_keys());
|
||||
top_block_index);
|
||||
|
||||
ASSERT_EQ(1, tx_proposals.size());
|
||||
const carrot::CarrotTransactionProposalV1 &tx_proposal = tx_proposals.at(0);
|
||||
@@ -301,8 +299,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_1)
|
||||
/*n_dests=*/1,
|
||||
/*fee_per_weight=*/1,
|
||||
/*extra=*/{},
|
||||
transfers.front().m_block_height + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE,
|
||||
alice.get_keys());
|
||||
transfers.front().m_block_height + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE);
|
||||
ASSERT_EQ(1, tx_proposals.size());
|
||||
const carrot::CarrotTransactionProposalV1 &tx_proposal = tx_proposals.at(0);
|
||||
|
||||
@@ -336,8 +333,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_2)
|
||||
/*n_dests=*/FCMP_PLUS_PLUS_MAX_OUTPUTS - 1,
|
||||
/*fee_per_weight=*/1,
|
||||
/*extra=*/{},
|
||||
transfers.front().m_block_height + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE,
|
||||
alice.get_keys());
|
||||
transfers.front().m_block_height + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE);
|
||||
ASSERT_EQ(1, tx_proposals.size());
|
||||
const carrot::CarrotTransactionProposalV1 &tx_proposal = tx_proposals.at(0);
|
||||
|
||||
@@ -379,8 +375,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_3)
|
||||
/*n_dests=*/FCMP_PLUS_PLUS_MAX_OUTPUTS,
|
||||
/*fee_per_weight=*/1,
|
||||
/*extra=*/{},
|
||||
transfers.front().m_block_height + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE,
|
||||
alice.get_keys());
|
||||
transfers.front().m_block_height + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE);
|
||||
ASSERT_EQ(1, tx_proposals.size());
|
||||
const carrot::CarrotTransactionProposalV1 &tx_proposal = tx_proposals.at(0);
|
||||
|
||||
@@ -455,8 +450,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_4)
|
||||
/*n_dests=*/n_dests,
|
||||
/*fee_per_weight=*/1,
|
||||
/*extra=*/{},
|
||||
top_block_index,
|
||||
alice.get_keys());
|
||||
top_block_index);
|
||||
ASSERT_EQ(4, tx_proposals.size());
|
||||
|
||||
std::set<crypto::key_image> actual_seen_kis;
|
||||
@@ -538,8 +532,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_5)
|
||||
/*n_dests=*/n_dests,
|
||||
/*fee_per_weight=*/1,
|
||||
/*extra=*/{},
|
||||
top_block_index,
|
||||
alice.get_keys());
|
||||
top_block_index);
|
||||
ASSERT_EQ(8, tx_proposals.size());
|
||||
|
||||
std::set<crypto::key_image> actual_seen_kis;
|
||||
@@ -621,8 +614,7 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_6)
|
||||
/*n_dests=*/n_dests,
|
||||
/*fee_per_weight=*/1,
|
||||
/*extra=*/{},
|
||||
top_block_index,
|
||||
alice.get_keys());
|
||||
top_block_index);
|
||||
ASSERT_EQ(1, tx_proposals.size());
|
||||
const carrot::CarrotTransactionProposalV1 &tx_proposal = tx_proposals.at(0);
|
||||
|
||||
@@ -718,23 +710,22 @@ TEST(wallet_tx_builder, make_carrot_transaction_proposals_wallet2_sweep_6)
|
||||
// ASSERT_EQ(2, alice.m_transfers.size());
|
||||
// ASSERT_EQ(amount0 + amount1, alice.balance_all(true)); // really, we care about unlocked_balance_all() for sending, but that call uses RPC
|
||||
|
||||
// // 6.
|
||||
// LOG_PRINT_L2("Alice feels pity on Bob and proposes to send his broke ass some dough");
|
||||
// const rct::xmr_amount out_amount = rct::randXmrAmount(amount0 + amount1);
|
||||
// const std::vector<carrot::CarrotTransactionProposalV1> tx_proposals =
|
||||
// tools::wallet::make_carrot_transaction_proposals_wallet2_transfer( // stupidly long function name ;(
|
||||
// alice.m_transfers,
|
||||
// alice.m_subaddresses,
|
||||
// {cryptonote::tx_destination_entry(out_amount, bob_main_addr, false)},
|
||||
// /*fee_per_weight=*/1,
|
||||
// /*extra=*/{},
|
||||
// /*subaddr_account=*/0,
|
||||
// /*subaddr_indices=*/{},
|
||||
// /*ignore_above=*/std::numeric_limits<rct::xmr_amount>::max(),
|
||||
// /*ignore_below=*/0,
|
||||
// {},
|
||||
// /*top_block_index=*/bc.height()-1,
|
||||
// alice_keys);
|
||||
// 6.
|
||||
LOG_PRINT_L2("Alice feels pity on Bob and proposes to send his broke ass some dough");
|
||||
const rct::xmr_amount out_amount = rct::randXmrAmount(amount0 + amount1);
|
||||
const std::vector<carrot::CarrotTransactionProposalV1> tx_proposals =
|
||||
tools::wallet::make_carrot_transaction_proposals_wallet2_transfer( // stupidly long function name ;(
|
||||
alice.m_transfers,
|
||||
alice.m_subaddresses,
|
||||
{cryptonote::tx_destination_entry(out_amount, bob_main_addr, false)},
|
||||
/*fee_per_weight=*/1,
|
||||
/*extra=*/{},
|
||||
/*subaddr_account=*/0,
|
||||
/*subaddr_indices=*/{},
|
||||
/*ignore_above=*/std::numeric_limits<rct::xmr_amount>::max(),
|
||||
/*ignore_below=*/0,
|
||||
{},
|
||||
/*top_block_index=*/bc.height()-1);
|
||||
|
||||
// ASSERT_EQ(1, tx_proposals.size());
|
||||
// const carrot::CarrotTransactionProposalV1 tx_proposal = tx_proposals.at(0);
|
||||
|
||||
Reference in New Issue
Block a user