mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
core: remove threadpool dependency from header
This commit is contained in:
parent
db55263b4c
commit
ce173cbb5b
@ -170,7 +170,6 @@ namespace cryptonote
|
|||||||
m_last_dns_checkpoints_update(0),
|
m_last_dns_checkpoints_update(0),
|
||||||
m_last_json_checkpoints_update(0),
|
m_last_json_checkpoints_update(0),
|
||||||
m_disable_dns_checkpoints(false),
|
m_disable_dns_checkpoints(false),
|
||||||
m_threadpool(tools::threadpool::getInstance()),
|
|
||||||
m_update_download(0),
|
m_update_download(0),
|
||||||
m_nettype(UNDEFINED)
|
m_nettype(UNDEFINED)
|
||||||
{
|
{
|
||||||
@ -713,10 +712,11 @@ namespace cryptonote
|
|||||||
std::vector<result> results(tx_blobs.size());
|
std::vector<result> results(tx_blobs.size());
|
||||||
|
|
||||||
tvc.resize(tx_blobs.size());
|
tvc.resize(tx_blobs.size());
|
||||||
|
tools::threadpool& tpool = tools::threadpool::getInstance();
|
||||||
tools::threadpool::waiter waiter;
|
tools::threadpool::waiter waiter;
|
||||||
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) {
|
||||||
m_threadpool.submit(&waiter, [&, i, it] {
|
tpool.submit(&waiter, [&, i, it] {
|
||||||
try
|
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);
|
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
|
else
|
||||||
{
|
{
|
||||||
m_threadpool.submit(&waiter, [&, i, it] {
|
tpool.submit(&waiter, [&, i, it] {
|
||||||
try
|
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);
|
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 "cryptonote_protocol/cryptonote_protocol_handler_common.h"
|
||||||
#include "storages/portable_storage_template_helper.h"
|
#include "storages/portable_storage_template_helper.h"
|
||||||
#include "common/download.h"
|
#include "common/download.h"
|
||||||
#include "common/threadpool.h"
|
|
||||||
#include "common/command_line.h"
|
#include "common/command_line.h"
|
||||||
#include "tx_pool.h"
|
#include "tx_pool.h"
|
||||||
#include "blockchain.h"
|
#include "blockchain.h"
|
||||||
@ -984,8 +983,6 @@ namespace cryptonote
|
|||||||
std::unordered_set<crypto::hash> bad_semantics_txes[2];
|
std::unordered_set<crypto::hash> bad_semantics_txes[2];
|
||||||
boost::mutex bad_semantics_txes_lock;
|
boost::mutex bad_semantics_txes_lock;
|
||||||
|
|
||||||
tools::threadpool& m_threadpool;
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
UPDATES_DISABLED,
|
UPDATES_DISABLED,
|
||||||
UPDATES_NOTIFY,
|
UPDATES_NOTIFY,
|
||||||
|
Loading…
Reference in New Issue
Block a user