forked from lthn/blockchain
fixed coretests compilation
This commit is contained in:
parent
be5766f266
commit
1a9c3b4d37
6 changed files with 20 additions and 9 deletions
|
|
@ -18,12 +18,14 @@ namespace currency
|
|||
{
|
||||
struct output_entry
|
||||
{
|
||||
//output_entry(const txout_ref_v& out_reference, const crypto::public_key& stealth_address)
|
||||
// : out_reference(out_reference), stealth_address(stealth_address), concealing_point(null_pkey), amount_commitment(null_pkey) {}
|
||||
output_entry() = default;
|
||||
output_entry(const output_entry &) = default;
|
||||
output_entry(const txout_ref_v& out_reference, const crypto::public_key& stealth_address)
|
||||
: out_reference(out_reference), stealth_address(stealth_address), concealing_point(null_pkey), amount_commitment(null_pkey) {}
|
||||
//output_entry(const txout_ref_v& out_reference, const crypto::public_key& stealth_address, const crypto::public_key& concealing_point, const crypto::public_key& amount_commitment)
|
||||
// : out_reference(out_reference), stealth_address(stealth_address), concealing_point(concealing_point), amount_commitment(amount_commitment) {}
|
||||
|
||||
txout_ref_v out_reference; // either globbal output index or ref_by_id
|
||||
txout_ref_v out_reference; // either global output index or ref_by_id
|
||||
crypto::public_key stealth_address; // a.k.a output's one-time public key
|
||||
crypto::public_key concealing_point; // only for zarcaum outputs
|
||||
crypto::public_key amount_commitment; // only for zarcaum outputs
|
||||
|
|
|
|||
|
|
@ -5859,7 +5859,7 @@ void wallet2::sweep_below(size_t fake_outs_count, const currency::account_public
|
|||
{
|
||||
if (td.m_global_output_index == daemon_oe.global_amount_index)
|
||||
continue;
|
||||
tx_output_entry oe;
|
||||
tx_output_entry oe = AUTO_VAL_INIT(oe);
|
||||
oe.out_reference = daemon_oe.global_amount_index;
|
||||
oe.stealth_address = daemon_oe.out_key;
|
||||
src.outputs.push_back(oe);
|
||||
|
|
|
|||
|
|
@ -885,7 +885,11 @@ 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 = boost::get<currency::tx_out_bare>(blk_0.miner_tx.vout[0]).amount;
|
||||
se.outputs.push_back(make_serializable_pair<txout_ref_v, crypto::public_key>(0, boost::get<currency::txout_to_key>(boost::get<currency::tx_out_bare>(blk_0.miner_tx.vout[0]).target).key));
|
||||
currency::tx_source_entry::output_entry oe = AUTO_VAL_INIT(oe);
|
||||
oe.out_reference = 0;
|
||||
oe.stealth_address = boost::get<txout_to_key>(boost::get<currency::tx_out_bare>(blk_0.miner_tx.vout[0]).target).key;
|
||||
se.outputs.push_back(oe);
|
||||
//se.outputs.push_back(make_serializable_pair<txout_ref_v, crypto::public_key>(0, boost::get<currency::txout_to_key>(boost::get<currency::tx_out_bare>(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);
|
||||
|
|
@ -1160,7 +1164,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 = boost::get<currency::tx_out_bare>(blk_0.miner_tx.vout[0]).amount;
|
||||
se.outputs.push_back(make_serializable_pair<txout_ref_v, crypto::public_key>(0, boost::get<currency::txout_to_key>(boost::get<currency::tx_out_bare>(blk_0.miner_tx.vout[0]).target).key));
|
||||
se.outputs.push_back(currency::tx_source_entry::output_entry(0, boost::get<currency::txout_to_key>(boost::get<currency::tx_out_bare>(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);
|
||||
|
|
|
|||
|
|
@ -1240,7 +1240,7 @@ bool fill_tx_sources(std::vector<currency::tx_source_entry>& sources, const std:
|
|||
{
|
||||
for (const auto& s_outputs_el : s.outputs) // avoid all outputs, including fake mix-ins
|
||||
{
|
||||
txout_ref_v sout = s_outputs_el.first;
|
||||
txout_ref_v sout = s_outputs_el.out_reference;
|
||||
if (sout.type().hash_code() == typeid(uint64_t).hash_code()) // output by global index
|
||||
{
|
||||
uint64_t gindex = boost::get<uint64_t>(sout);
|
||||
|
|
|
|||
|
|
@ -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(make_serializable_pair<currency::txout_ref_v, crypto::public_key>(global_out_index, boost::get<currency::txout_to_key>(boost::get<currency::tx_out_bare>(tx_0.vout[se.real_output_in_tx_index]).target).key));
|
||||
se.outputs.push_back(currency::tx_source_entry::output_entry(global_out_index, boost::get<currency::txout_to_key>(boost::get<currency::tx_out_bare>(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);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,12 @@ namespace
|
|||
{
|
||||
currency::tx_source_entry se = AUTO_VAL_INIT(se);
|
||||
se.amount =boost::get<currency::tx_out_bare>( tx.vout[out_idx]).amount;
|
||||
se.outputs.push_back(make_serializable_pair<txout_ref_v, crypto::public_key>(0, boost::get<currency::txout_to_key>(boost::get<currency::tx_out_bare>(tx.vout[out_idx]).target).key));
|
||||
|
||||
currency::tx_source_entry::output_entry oe = AUTO_VAL_INIT(oe);
|
||||
oe.out_reference = 0;
|
||||
oe.stealth_address = boost::get<txout_to_key>(boost::get<currency::tx_out_bare>(tx.vout[out_idx]).target).key;
|
||||
se.outputs.push_back(oe);
|
||||
//se.outputs.push_back(make_serializable_pair<txout_ref_v, crypto::public_key>(0, boost::get<currency::txout_to_key>(boost::get<currency::tx_out_bare>(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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue