From 53ad5a0f42174bca57e24485ef3d40e4b9cf5599 Mon Sep 17 00:00:00 2001 From: kenshi84 Date: Sun, 19 Feb 2017 11:42:10 +0900 Subject: Subaddresses --- tests/core_tests/chaingen.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/core_tests/chaingen.cpp') diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp index b15487a24..f23aa8ecb 100644 --- a/tests/core_tests/chaingen.cpp +++ b/tests/core_tests/chaingen.cpp @@ -344,7 +344,7 @@ bool init_output_indices(map_output_idx_t& outs, std::map(out.target), get_tx_pub_key_from_extra(tx), j)) { + if (is_out_to_acc(from.get_keys(), boost::get(out.target), get_tx_pub_key_from_extra(tx), get_additional_tx_pub_keys_from_extra(tx), j)) { outs_mine[out.amount].push_back(tx_global_idx); } } @@ -364,7 +364,10 @@ bool init_spent_output_indices(map_output_idx_t& outs, map_output_t& outs_mine, // construct key image for this output crypto::key_image img; keypair in_ephemeral; - generate_key_image_helper(from.get_keys(), get_tx_pub_key_from_extra(*oi.p_tx), oi.out_no, in_ephemeral, img); + crypto::public_key out_key = boost::get(oi.out).key; + std::unordered_map subaddresses; + subaddresses[from.get_keys().m_account_address.m_spend_public_key] = {0,0}; + generate_key_image_helper(from.get_keys(), subaddresses, out_key, get_tx_pub_key_from_extra(*oi.p_tx), get_additional_tx_pub_keys_from_extra(*oi.p_tx), oi.out_no, in_ephemeral, img); // lookup for this key image in the events vector BOOST_FOREACH(auto& tx_pair, mtx) { -- cgit v1.2.3