1
0
Fork 0
forked from lthn/blockchain

coretests adapted for serializable_pair

This commit is contained in:
sowle 2019-05-01 16:01:10 +02:00
parent 6f3c2fcbcc
commit 976ed481d0
5 changed files with 7 additions and 7 deletions

View file

@ -922,7 +922,7 @@ bool gen_alias_reg_with_locked_money::generate(std::vector<test_event_entry>& ev
currency::tx_source_entry se = AUTO_VAL_INIT(se);
se.amount = blk_0.miner_tx.vout[0].amount;
se.outputs.push_back(std::make_pair(0, boost::get<currency::txout_to_key>(blk_0.miner_tx.vout[0].target).key));
se.outputs.push_back(make_serializable_pair<txout_v, crypto::public_key>(0, boost::get<currency::txout_to_key>(blk_0.miner_tx.vout[0].target).key));
se.real_output = 0;
se.real_output_in_tx_index = 0;
se.real_out_tx_key = currency::get_tx_pub_key_from_extra(blk_0.miner_tx);
@ -1192,7 +1192,7 @@ bool gen_alias_tx_no_outs::generate(std::vector<test_event_entry>& events) const
currency::tx_source_entry se = AUTO_VAL_INIT(se);
se.amount = blk_0.miner_tx.vout[0].amount;
se.outputs.push_back(std::make_pair(0, boost::get<currency::txout_to_key>(blk_0.miner_tx.vout[0].target).key));
se.outputs.push_back(make_serializable_pair<txout_v, crypto::public_key>(0, boost::get<currency::txout_to_key>(blk_0.miner_tx.vout[0].target).key));
se.real_output = 0;
se.real_output_in_tx_index = 0;
se.real_out_tx_key = currency::get_tx_pub_key_from_extra(blk_0.miner_tx);

View file

@ -312,7 +312,7 @@ bool gen_block_miner_tx_has_2_in::generate(std::vector<test_event_entry>& events
tx_source_entry se = AUTO_VAL_INIT(se);
se.amount = blk_0.miner_tx.vout[0].amount;
se.outputs.push_back(std::make_pair(0, boost::get<txout_to_key>(blk_0.miner_tx.vout[0].target).key));
se.outputs.push_back(make_serializable_pair<txout_v, crypto::public_key>(0, boost::get<txout_to_key>(blk_0.miner_tx.vout[0].target).key));
se.real_output = 0;
se.real_out_tx_key = get_tx_pub_key_from_extra(blk_0.miner_tx);
se.real_output_in_tx_index = 0;
@ -355,7 +355,7 @@ bool gen_block_miner_tx_with_txin_to_key::generate(std::vector<test_event_entry>
tx_source_entry se = AUTO_VAL_INIT(se);
se.amount = blk_1.miner_tx.vout[0].amount;
se.outputs.push_back(std::make_pair(0, boost::get<txout_to_key>(blk_1.miner_tx.vout[0].target).key));
se.outputs.push_back(make_serializable_pair<txout_v, crypto::public_key>(0, boost::get<txout_to_key>(blk_1.miner_tx.vout[0].target).key));
se.real_output = 0;
se.real_out_tx_key = get_tx_pub_key_from_extra(blk_1.miner_tx);
se.real_output_in_tx_index = 0;

View file

@ -92,7 +92,7 @@ struct gen_double_spend_in_alt_chain_in_different_blocks : public gen_double_spe
class gen_double_spend_in_different_chains : public test_chain_unit_base
{
public:
static const uint64_t send_amount = MK_TEST_COINS(TESTS_DEFAULT_FEE*10);
static const uint64_t send_amount = MK_TEST_COINS(10);
static const size_t expected_blockchain_height = 4 + 2 * CURRENCY_MINED_MONEY_UNLOCK_WINDOW;
gen_double_spend_in_different_chains();

View file

@ -80,7 +80,7 @@ bool gen_double_spend_in_tx<txs_kept_by_block>::generate(std::vector<test_event_
uint64_t global_out_index = 0;
bool r = find_global_index_for_output(events, get_block_hash(blk_1r), tx_0, se.real_output_in_tx_index, global_out_index);
CHECK_AND_ASSERT_MES(r, false, "find_global_index_for_output failed");
se.outputs.push_back(std::make_pair(global_out_index, boost::get<currency::txout_to_key>(tx_0.vout[se.real_output_in_tx_index].target).key));
se.outputs.push_back(make_serializable_pair<currency::txout_v, crypto::public_key>(global_out_index, boost::get<currency::txout_to_key>(tx_0.vout[se.real_output_in_tx_index].target).key));
se.real_output = 0;
se.real_out_tx_key = get_tx_pub_key_from_extra(tx_0);
sources.push_back(se);

View file

@ -36,7 +36,7 @@ namespace
{
currency::tx_source_entry se = AUTO_VAL_INIT(se);
se.amount = tx.vout[out_idx].amount;
se.outputs.push_back(std::make_pair(0, boost::get<currency::txout_to_key>(tx.vout[out_idx].target).key));
se.outputs.push_back(make_serializable_pair<txout_v, crypto::public_key>(0, boost::get<currency::txout_to_key>(tx.vout[out_idx].target).key));
se.real_output = 0;
se.real_out_tx_key = get_tx_pub_key_from_extra(tx);
se.real_output_in_tx_index = out_idx;