mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 00:37:43 +00:00
core: remove threadpool dependency from header
This commit is contained in:
parent
db55263b4c
commit
ce173cbb5b
2 changed files with 3 additions and 6 deletions
|
@ -170,7 +170,6 @@ namespace cryptonote
|
|||
m_last_dns_checkpoints_update(0),
|
||||
m_last_json_checkpoints_update(0),
|
||||
m_disable_dns_checkpoints(false),
|
||||
m_threadpool(tools::threadpool::getInstance()),
|
||||
m_update_download(0),
|
||||
m_nettype(UNDEFINED)
|
||||
{
|
||||
|
@ -713,10 +712,11 @@ namespace cryptonote
|
|||
std::vector<result> results(tx_blobs.size());
|
||||
|
||||
tvc.resize(tx_blobs.size());
|
||||
tools::threadpool& tpool = tools::threadpool::getInstance();
|
||||
tools::threadpool::waiter waiter;
|
||||
std::list<blobdata>::const_iterator it = tx_blobs.begin();
|
||||
for (size_t i = 0; i < tx_blobs.size(); i++, ++it) {
|
||||
m_threadpool.submit(&waiter, [&, i, it] {
|
||||
tpool.submit(&waiter, [&, i, it] {
|
||||
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);
|
||||
|
@ -743,7 +743,7 @@ namespace cryptonote
|
|||
}
|
||||
else
|
||||
{
|
||||
m_threadpool.submit(&waiter, [&, i, it] {
|
||||
tpool.submit(&waiter, [&, i, it] {
|
||||
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);
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "cryptonote_protocol/cryptonote_protocol_handler_common.h"
|
||||
#include "storages/portable_storage_template_helper.h"
|
||||
#include "common/download.h"
|
||||
#include "common/threadpool.h"
|
||||
#include "common/command_line.h"
|
||||
#include "tx_pool.h"
|
||||
#include "blockchain.h"
|
||||
|
@ -984,8 +983,6 @@ namespace cryptonote
|
|||
std::unordered_set<crypto::hash> bad_semantics_txes[2];
|
||||
boost::mutex bad_semantics_txes_lock;
|
||||
|
||||
tools::threadpool& m_threadpool;
|
||||
|
||||
enum {
|
||||
UPDATES_DISABLED,
|
||||
UPDATES_NOTIFY,
|
||||
|
|
Loading…
Reference in a new issue