From 329f149e9527d8be583301da2991d56053c15c09 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Sun, 15 Oct 2017 18:54:35 +0200 Subject: [PATCH 1/2] remove reference to cryptonote::null_hash --- src/cryptonote_core/blockchain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 3028866c4..53dfc175f 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -3234,7 +3234,7 @@ leave: { auto hash = get_block_hash(bl); const auto &expected_hash = m_blocks_hash_check[m_db->height()]; - if (expected_hash != cryptonote::null_hash) + if (expected_hash != crypto::null_hash) { if (memcmp(&hash, &expected_hash, sizeof(hash)) != 0) { @@ -3797,7 +3797,7 @@ uint64_t Blockchain::prevalidate_block_hashes(uint64_t height, const std::list Date: Sun, 15 Oct 2017 18:55:33 +0200 Subject: [PATCH 2/2] fix lightwallet and subaddresses conflict --- src/wallet/wallet2.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index f316b5d1d..cc0e9e7e2 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -5324,7 +5324,12 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image, // Not in cache - calculate key image crypto::key_image calculated_key_image; cryptonote::keypair in_ephemeral; - cryptonote::generate_key_image_helper(get_account().get_keys(), tx_public_key, out_index, in_ephemeral, calculated_key_image); + + // Subaddresses aren't supported in mymonero/openmonero yet. Using empty values. + const std::vector additional_tx_pub_keys; + const crypto::public_key pkey = crypto::null_pkey; + + cryptonote::generate_key_image_helper(get_account().get_keys(), m_subaddresses, pkey, tx_public_key, additional_tx_pub_keys, out_index, in_ephemeral, calculated_key_image); index_keyimage_map.emplace(out_index, calculated_key_image); m_key_image_cache.emplace(tx_public_key, index_keyimage_map); return key_image == calculated_key_image;