diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-03-05 19:46:01 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-03-05 19:46:55 +0000 |
commit | cfa2564a40fc3ecee7bae718ef5c68a9f093c15e (patch) | |
tree | ab78bcefb90f22887afd3583cdae568a3c2ae9b4 | |
parent | blockchain_import: make --log-level understand categories (diff) | |
download | monero-cfa2564a40fc3ecee7bae718ef5c68a9f093c15e.tar.xz |
blockchain: don't try to load an empty block hash set
If the blocks aren't being linked against a binary (such as
one of the blockchain utilities), the symbol will not be
NULL, but the size will be 0. This avoids a apurious warning
about the data hash.
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index f49050918..0713274a6 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -4016,7 +4016,7 @@ void Blockchain::cancel() static const char expected_block_hashes_hash[] = "23d8a8c73de7b2383c72a016d9a6034e69d62dd48077d1c414e064ceab6daa94"; void Blockchain::load_compiled_in_block_hashes() { - if (m_fast_sync && get_blocks_dat_start(m_testnet) != nullptr) + if (m_fast_sync && get_blocks_dat_start(m_testnet) != nullptr && get_blocks_dat_size(m_testnet) > 0) { MINFO("Loading precomputed blocks (" << get_blocks_dat_size(m_testnet) << " bytes)"); |