mirror of
https://github.com/monero-project/monero.git
synced 2024-12-29 15:06:11 -05:00
core: guard against exceptions in tx verification worker threads
This commit is contained in:
parent
fda88c8d28
commit
3deef4018e
@ -597,7 +597,15 @@ namespace cryptonote
|
|||||||
std::list<blobdata>::const_iterator it = tx_blobs.begin();
|
std::list<blobdata>::const_iterator it = tx_blobs.begin();
|
||||||
for (size_t i = 0; i < tx_blobs.size(); i++, ++it) {
|
for (size_t i = 0; i < tx_blobs.size(); i++, ++it) {
|
||||||
region.run([&, 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;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -617,7 +625,15 @@ namespace cryptonote
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
region.run([&, i, it] {
|
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;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user