diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-10-27 19:14:14 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-10-27 19:23:25 +0000 |
| commit | eb16755083fc62af321966a1a8ef9a9ad0605207 (patch) | |
| tree | b39dd53d383b93b349e4c5673be6cc09fa7e71f3 /src/cryptonote_core/blockchain.cpp | |
| parent | b928ead30e8c6486a2ceabcc546f86916f2889f2 (diff) | |
| download | monzero-core-eb16755083fc62af321966a1a8ef9a9ad0605207.tar.gz monzero-core-eb16755083fc62af321966a1a8ef9a9ad0605207.tar.xz monzero-core-eb16755083fc62af321966a1a8ef9a9ad0605207.zip | |
blockchain: fix unwanted error when probing the pool for a tx
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
| -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)) { |
