Merge pull request #3828

16e209e core: lock incoming tx lock when checking the txpool and chain (moneromooo-monero)
This commit is contained in:
luigi1111 2018-06-19 12:41:07 -05:00
commit 50bc95519e
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -675,6 +675,7 @@ namespace cryptonote
bool core::handle_incoming_txs(const std::list<blobdata>& tx_blobs, std::vector<tx_verification_context>& tvc, bool keeped_by_block, bool relayed, bool do_not_relay) bool core::handle_incoming_txs(const std::list<blobdata>& tx_blobs, std::vector<tx_verification_context>& tvc, bool keeped_by_block, bool relayed, bool do_not_relay)
{ {
TRY_ENTRY(); TRY_ENTRY();
CRITICAL_REGION_LOCAL(m_incoming_tx_lock);
struct result { bool res; cryptonote::transaction tx; crypto::hash hash; crypto::hash prefix_hash; bool in_txpool; bool in_blockchain; }; struct result { bool res; cryptonote::transaction tx; crypto::hash hash; crypto::hash prefix_hash; bool in_txpool; bool in_blockchain; };
std::vector<result> results(tx_blobs.size()); std::vector<result> results(tx_blobs.size());