diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-09-14 18:31:46 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-09-14 18:31:46 +0200 |
commit | 7abdba0a5c70474098a527351a4db2ce3a3c79ad (patch) | |
tree | 4d892e5f7f25e844d452d40d2302f4f2ab9c21da /src/cryptonote_core | |
parent | Merge pull request #2421 (diff) | |
parent | core: guard against exceptions in tx verification worker threads (diff) | |
download | monero-7abdba0a5c70474098a527351a4db2ce3a3c79ad.tar.xz |
Merge pull request #2438
9443eec1 core: guard against exceptions in tx verification worker threads (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index f9f098ead..c3aeb15f0 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -595,7 +595,15 @@ namespace cryptonote std::list<blobdata>::const_iterator it = tx_blobs.begin(); for (size_t i = 0; i < tx_blobs.size(); i++, ++it) { region.run([&, i, it] { - results[i].res = handle_incoming_tx_pre(*it, tvc[i], results[i].tx, results[i].hash, results[i].prefix_hash, keeped_by_block, relayed, do_not_relay); + try + { + results[i].res = handle_incoming_tx_pre(*it, tvc[i], results[i].tx, results[i].hash, results[i].prefix_hash, keeped_by_block, relayed, do_not_relay); + } + catch (const std::exception &e) + { + MERROR_VER("Exception in handle_incoming_tx_pre: " << e.what()); + results[i].res = false; + } }); } }); @@ -615,7 +623,15 @@ namespace cryptonote else { region.run([&, i, it] { - results[i].res = handle_incoming_tx_post(*it, tvc[i], results[i].tx, results[i].hash, results[i].prefix_hash, keeped_by_block, relayed, do_not_relay); + try + { + results[i].res = handle_incoming_tx_post(*it, tvc[i], results[i].tx, results[i].hash, results[i].prefix_hash, keeped_by_block, relayed, do_not_relay); + } + catch (const std::exception &e) + { + MERROR_VER("Exception in handle_incoming_tx_post: " << e.what()); + results[i].res = false; + } }); } } |