completed first successful tx from old keys to old keys post carrot fork
This commit is contained in:
@@ -710,6 +710,7 @@ static void subtest_2out_transfer_get_output_enote_proposals_completeness(const
|
||||
// turn payment proposals into enotes, passing dummy pid_enc if bob isn't integrated
|
||||
std::vector<RCTOutputEnoteProposal> enote_proposals;
|
||||
encrypted_payment_id_t encrypted_payment_id;
|
||||
size_t change_index;
|
||||
get_output_enote_proposals({bob_payment_proposal},
|
||||
{alice_payment_proposal},
|
||||
dummy_encrypted_pid,
|
||||
@@ -717,7 +718,8 @@ static void subtest_2out_transfer_get_output_enote_proposals_completeness(const
|
||||
&alice.k_view_incoming_dev,
|
||||
tx_first_key_image,
|
||||
enote_proposals,
|
||||
encrypted_payment_id);
|
||||
encrypted_payment_id,
|
||||
change_index);
|
||||
|
||||
ASSERT_EQ(2, enote_proposals.size()); // 2-out tx
|
||||
|
||||
|
||||
@@ -374,6 +374,7 @@ TEST(carrot_fcmp, receive_scan_spend_and_verify_serialized_carrot_tx)
|
||||
LOG_PRINT_L1("Deriving enotes");
|
||||
std::vector<RCTOutputEnoteProposal> output_enote_proposals;
|
||||
encrypted_payment_id_t encrypted_payment_id;
|
||||
size_t change_index;
|
||||
get_output_enote_proposals(tx_proposal.normal_payment_proposals,
|
||||
selfsend_payment_proposal_cores,
|
||||
tx_proposal.dummy_encrypted_payment_id,
|
||||
@@ -382,7 +383,8 @@ TEST(carrot_fcmp, receive_scan_spend_and_verify_serialized_carrot_tx)
|
||||
alice.carrot_account_spend_pubkey,
|
||||
tx_proposal.key_images_sorted.at(0),
|
||||
output_enote_proposals,
|
||||
encrypted_payment_id);
|
||||
encrypted_payment_id,
|
||||
change_index);
|
||||
|
||||
// Collect balance info and enotes
|
||||
std::vector<crypto::public_key> input_onetime_addresses;
|
||||
@@ -409,6 +411,7 @@ TEST(carrot_fcmp, receive_scan_spend_and_verify_serialized_carrot_tx)
|
||||
LOG_PRINT_L1("Storing carrot to transaction");
|
||||
cryptonote::transaction tx = store_carrot_to_transaction_v1(output_enotes,
|
||||
tx_proposal.key_images_sorted,
|
||||
tx_proposal.sources,
|
||||
tx_proposal.fee,
|
||||
encrypted_payment_id);
|
||||
|
||||
|
||||
@@ -203,6 +203,7 @@ static void subtest_multi_account_transfer_over_transaction(const unittest_trans
|
||||
// can be passed to a hardware device for deterministic verification of the signable tx hash
|
||||
std::vector<RCTOutputEnoteProposal> rederived_output_enote_proposals;
|
||||
encrypted_payment_id_t rederived_encrypted_payment_id;
|
||||
size_t change_index;
|
||||
get_output_enote_proposals(tx_proposal.normal_payment_proposals,
|
||||
modified_selfsend_payment_proposals,
|
||||
*parsed_encrypted_payment_id,
|
||||
@@ -210,7 +211,8 @@ static void subtest_multi_account_transfer_over_transaction(const unittest_trans
|
||||
&ss_keys.k_view_incoming_dev,
|
||||
parsed_key_images.at(0),
|
||||
rederived_output_enote_proposals,
|
||||
rederived_encrypted_payment_id);
|
||||
rederived_encrypted_payment_id,
|
||||
change_index);
|
||||
EXPECT_EQ(*parsed_encrypted_payment_id, rederived_encrypted_payment_id);
|
||||
ASSERT_EQ(parsed_enotes.size(), rederived_output_enote_proposals.size());
|
||||
for (size_t enote_idx = 0; enote_idx < parsed_enotes.size(); ++enote_idx)
|
||||
|
||||
@@ -187,6 +187,7 @@ static void subtest_legacy_2out_transfer_get_output_enote_proposals_completeness
|
||||
// turn payment proposals into enotes, always pass dummy pid
|
||||
std::vector<RCTOutputEnoteProposal> enote_proposals;
|
||||
encrypted_payment_id_t encrypted_payment_id;
|
||||
size_t change_index;
|
||||
get_output_enote_proposals({bob_payment_proposal},
|
||||
{alice_payment_proposal},
|
||||
gen_encrypted_payment_id(),
|
||||
@@ -194,7 +195,8 @@ static void subtest_legacy_2out_transfer_get_output_enote_proposals_completeness
|
||||
&alive_k_v_dev,
|
||||
tx_first_key_image,
|
||||
enote_proposals,
|
||||
encrypted_payment_id);
|
||||
encrypted_payment_id,
|
||||
change_index);
|
||||
|
||||
ASSERT_EQ(2, enote_proposals.size()); // 2-out tx
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ bool construct_miner_tx_fake_reward_1out(const size_t height,
|
||||
height,
|
||||
coinbase_enotes);
|
||||
|
||||
tx = carrot::store_carrot_to_coinbase_transaction_v1(coinbase_enotes, "", cryptonote::transaction_type::MINER);
|
||||
tx = carrot::store_carrot_to_coinbase_transaction_v1(coinbase_enotes, "", cryptonote::transaction_type::MINER, height);
|
||||
}
|
||||
else // !is_carrot
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user