diff options
author | luigi1111 <luigi1111w@gmail.com> | 2019-10-27 16:26:25 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2019-10-27 16:26:25 -0500 |
commit | bb04201505652fcd0f0281da26df7ecd5b834e6d (patch) | |
tree | e32a68e111f447fde2768e4e69ebfb7451311826 | |
parent | Merge pull request #6039 (diff) | |
parent | blockchain: fix unwanted error when probing the pool for a tx (diff) | |
download | monero-bb04201505652fcd0f0281da26df7ecd5b834e6d.tar.xz |
Merge pull request #6045
86ac20f blockchain: fix unwanted error when probing the pool for a tx (moneromooo-monero)
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index b7e9f4ca2..b13ecbbf1 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1765,9 +1765,18 @@ bool Blockchain::handle_alternative_block(const block& b, const crypto::hash& id { cryptonote::tx_memory_pool::tx_details td; cryptonote::blobdata blob; - if (m_tx_pool.get_transaction_info(txid, td)) + if (m_tx_pool.have_tx(txid)) { - bei.block_cumulative_weight += td.weight; + if (m_tx_pool.get_transaction_info(txid, td)) + { + bei.block_cumulative_weight += td.weight; + } + else + { + MERROR_VER("Transaction is in the txpool, but metadata not found"); + bvc.m_verifivation_failed = true; + return false; + } } else if (m_db->get_pruned_tx_blob(txid, blob)) { |