diff options
author | luigi1111 <luigi1111w@gmail.com> | 2022-04-19 22:14:03 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2022-04-19 22:14:03 -0500 |
commit | 96758a7d05bb1747951ffac87a307d592f882655 (patch) | |
tree | 20900ece7aacd538bb3bacba72e7592e03bd915f /src/blockchain_db/lmdb | |
parent | Merge pull request #8211 (diff) | |
parent | Add view tags to outputs to reduce wallet scanning time (diff) | |
download | monero-96758a7d05bb1747951ffac87a307d592f882655.tar.xz |
Merge pull request #8061
ea87b30 Add view tags to outputs to reduce wallet scanning time (j-berman)
Diffstat (limited to 'src/blockchain_db/lmdb')
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp index 3522c4a1b..e2ac9df0b 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp +++ b/src/blockchain_db/lmdb/db_lmdb.cpp @@ -1045,8 +1045,9 @@ uint64_t BlockchainLMDB::add_output(const crypto::hash& tx_hash, CURSOR(output_txs) CURSOR(output_amounts) - if (tx_output.target.type() != typeid(txout_to_key)) - throw0(DB_ERROR("Wrong output type: expected txout_to_key")); + crypto::public_key output_public_key; + if (!get_output_public_key(tx_output, output_public_key)) + throw0(DB_ERROR("Could not get an output public key from a tx output.")); if (tx_output.amount == 0 && !commitment) throw0(DB_ERROR("RCT output without commitment")); @@ -1074,7 +1075,7 @@ uint64_t BlockchainLMDB::add_output(const crypto::hash& tx_hash, else ok.amount_index = 0; ok.output_id = m_num_outputs; - ok.data.pubkey = boost::get < txout_to_key > (tx_output.target).key; + ok.data.pubkey = output_public_key; ok.data.unlock_time = unlock_time; ok.data.height = m_height; if (tx_output.amount == 0) |