Merge pull request #4854

bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
This commit is contained in:
Riccardo Spagni 2018-12-04 17:08:42 +02:00
commit c00ac446fd
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
39 changed files with 38 additions and 168 deletions

View File

@ -36,7 +36,6 @@
#define _ABSTRACT_TCP_SERVER2_H_ #define _ABSTRACT_TCP_SERVER2_H_
#include <boost/asio.hpp>
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>

View File

@ -32,16 +32,13 @@
//#include "net_utils_base.h" #include <boost/bind.hpp>
#include <boost/lambda/bind.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/uuid/random_generator.hpp> #include <boost/uuid/random_generator.hpp>
#include <boost/chrono.hpp> #include <boost/chrono.hpp>
#include <boost/utility/value_init.hpp> #include <boost/utility/value_init.hpp>
#include <boost/asio/deadline_timer.hpp> #include <boost/asio/deadline_timer.hpp>
#include <boost/date_time/posix_time/posix_time.hpp> // TODO #include <boost/date_time/posix_time/posix_time.hpp> // TODO
#include <boost/thread/thread.hpp> // TODO
#include <boost/thread/condition_variable.hpp> // TODO #include <boost/thread/condition_variable.hpp> // TODO
#include "warnings.h" #include "warnings.h"
#include "string_tools.h" #include "string_tools.h"

View File

@ -42,22 +42,11 @@
#define INCLUDED_p2p_connection_basic_hpp #define INCLUDED_p2p_connection_basic_hpp
#include <boost/asio.hpp>
#include <string> #include <string>
#include <vector>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <atomic> #include <atomic>
#include <memory>
#include <boost/asio.hpp> #include <boost/asio.hpp>
#include <boost/array.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/thread/thread.hpp>
#include <memory>
#include "net/net_utils_base.h" #include "net/net_utils_base.h"
#include "syncobj.h" #include "syncobj.h"

View File

@ -33,7 +33,8 @@
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include "net/http_server_cp2.h" #include "net/abstract_tcp_server2.h"
#include "http_protocol_handler.h"
#include "net/http_server_handlers_map2.h" #include "net/http_server_handlers_map2.h"
#undef MONERO_DEFAULT_LOG_CATEGORY #undef MONERO_DEFAULT_LOG_CATEGORY

View File

@ -34,47 +34,15 @@
#include "net/connection_basic.hpp" #include "net/connection_basic.hpp"
#include <boost/asio.hpp>
#include <string>
#include <vector>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <atomic>
#include <boost/asio.hpp>
#include <boost/array.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/thread/thread.hpp>
#include <memory>
#include "syncobj.h"
#include "net/net_utils_base.h" #include "net/net_utils_base.h"
#include "misc_log_ex.h" #include "misc_log_ex.h"
#include <boost/lambda/bind.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/uuid/random_generator.hpp>
#include <boost/chrono.hpp>
#include <boost/utility/value_init.hpp>
#include <boost/asio/deadline_timer.hpp>
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/filesystem.hpp>
#include "misc_language.h" #include "misc_language.h"
#include "pragma_comp_defs.h" #include "pragma_comp_defs.h"
#include <fstream>
#include <sstream>
#include <iomanip> #include <iomanip>
#include <algorithm>
#include <mutex>
#include <boost/asio/basic_socket.hpp> #include <boost/asio/basic_socket.hpp>
#include <boost/asio/ip/unicast.hpp>
#include "net/abstract_tcp_server2.h"
// TODO: // TODO:
#include "net/network_throttle-detail.hpp" #include "net/network_throttle-detail.hpp"
@ -161,7 +129,6 @@ connection_basic::connection_basic(boost::asio::io_service& io_service, std::ato
try { boost::system::error_code e; remote_addr_str = socket_.remote_endpoint(e).address().to_string(); } catch(...){} ; try { boost::system::error_code e; remote_addr_str = socket_.remote_endpoint(e).address().to_string(); } catch(...){} ;
_note("Spawned connection p2p#"<<mI->m_peer_number<<" to " << remote_addr_str << " currently we have sockets count:" << m_ref_sock_count); _note("Spawned connection p2p#"<<mI->m_peer_number<<" to " << remote_addr_str << " currently we have sockets count:" << m_ref_sock_count);
//boost::filesystem::create_directories("log/dr-monero/net/");
} }
connection_basic::~connection_basic() noexcept(false) { connection_basic::~connection_basic() noexcept(false) {

View File

@ -2,8 +2,6 @@
#include "net/net_utils_base.h" #include "net/net_utils_base.h"
#include "string_tools.h" #include "string_tools.h"
#include <cstring>
#include <typeindex>
#include "net/local_ip.h" #include "net/local_ip.h"
namespace epee { namespace net_utils namespace epee { namespace net_utils

View File

@ -32,20 +32,11 @@
/* rfree: implementation for throttle details */ /* rfree: implementation for throttle details */
#include <boost/asio.hpp>
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <atomic> #include <atomic>
#include <boost/asio.hpp> #include <boost/asio.hpp>
#include <boost/array.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/thread/thread.hpp>
#include <memory> #include <memory>
@ -53,14 +44,7 @@
#include "net/net_utils_base.h" #include "net/net_utils_base.h"
#include "misc_log_ex.h" #include "misc_log_ex.h"
#include <boost/lambda/bind.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/uuid/random_generator.hpp>
#include <boost/chrono.hpp> #include <boost/chrono.hpp>
#include <boost/utility/value_init.hpp>
#include <boost/asio/deadline_timer.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/thread/thread.hpp>
#include "misc_language.h" #include "misc_language.h"
#include "pragma_comp_defs.h" #include "pragma_comp_defs.h"
#include <sstream> #include <sstream>

View File

@ -1,9 +1,9 @@
#include "readline_buffer.h" #include "readline_buffer.h"
#include <readline/readline.h> #include <readline/readline.h>
#include <readline/history.h> #include <readline/history.h>
#include <unistd.h>
#include <iostream> #include <iostream>
#include <boost/thread.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/lock_guard.hpp>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
static void install_line_handler(); static void install_line_handler();

View File

@ -29,7 +29,9 @@
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include "net/levin_server_cp2.h" #include "net/abstract_tcp_server2.h"
#include "net/levin_protocol_handler.h"
#include "net/levin_protocol_handler_async.h"
#include "storages/abstract_invoke.h" #include "storages/abstract_invoke.h"
namespace epee namespace epee

View File

@ -30,7 +30,6 @@
#pragma once #pragma once
#include <list>
#include <string> #include <string>
#include <exception> #include <exception>
#include <boost/program_options.hpp> #include <boost/program_options.hpp>

View File

@ -29,10 +29,8 @@
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/format.hpp> #include <boost/format.hpp>
#include <boost/current_function.hpp>
#include <memory> // std::unique_ptr #include <memory> // std::unique_ptr
#include <cstring> // memcpy #include <cstring> // memcpy
#include <random>
#include "string_tools.h" #include "string_tools.h"
#include "file_io_utils.h" #include "file_io_utils.h"

View File

@ -28,17 +28,15 @@
// //
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
#include "include_base_utils.h"
using namespace epee;
#include "checkpoints.h" #include "checkpoints.h"
#include "common/dns_utils.h" #include "common/dns_utils.h"
#include "include_base_utils.h"
#include "string_tools.h" #include "string_tools.h"
#include "storages/portable_storage_template_helper.h" // epee json include #include "storages/portable_storage_template_helper.h" // epee json include
#include "serialization/keyvalue_serialization.h" #include "serialization/keyvalue_serialization.h"
#include <vector>
using namespace epee;
#undef MONERO_DEFAULT_LOG_CATEGORY #undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "checkpoints" #define MONERO_DEFAULT_LOG_CATEGORY "checkpoints"

View File

@ -30,7 +30,6 @@
#pragma once #pragma once
#include <map> #include <map>
#include <vector>
#include "misc_log_ex.h" #include "misc_log_ex.h"
#include "crypto/hash.h" #include "crypto/hash.h"
#include "cryptonote_config.h" #include "cryptonote_config.h"

View File

@ -36,7 +36,6 @@
#include "crypto/hash.h" #include "crypto/hash.h"
#include "int-util.h" #include "int-util.h"
#include "util.h"
#include "varint.h" #include "varint.h"
namespace tools namespace tools

View File

@ -31,10 +31,7 @@
#include "command_line.h" #include "command_line.h"
#include <boost/algorithm/string/compare.hpp> #include <boost/algorithm/string/compare.hpp>
#include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/predicate.hpp>
#include <unordered_set>
#include "common/i18n.h" #include "common/i18n.h"
#include "cryptonote_config.h"
#include "string_tools.h"
namespace command_line namespace command_line
{ {

View File

@ -33,13 +33,11 @@
#include <stdlib.h> #include <stdlib.h>
#include "include_base_utils.h" #include "include_base_utils.h"
#include <random> #include <random>
#include <boost/filesystem/fstream.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/algorithm/string/join.hpp> #include <boost/algorithm/string/join.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
using namespace epee; using namespace epee;
namespace bf = boost::filesystem;
#undef MONERO_DEFAULT_LOG_CATEGORY #undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.dns" #define MONERO_DEFAULT_LOG_CATEGORY "net.dns"

View File

@ -29,10 +29,7 @@
#include <string> #include <string>
#include <atomic> #include <atomic>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/asio.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include "cryptonote_config.h"
#include "include_base_utils.h"
#include "file_io_utils.h" #include "file_io_utils.h"
#include "net/http_client.h" #include "net/http_client.h"
#include "download.h" #include "download.h"

View File

@ -31,9 +31,7 @@
#include <ctype.h> #include <ctype.h>
#include <string> #include <string>
#include <map> #include <map>
#include "include_base_utils.h"
#include "file_io_utils.h" #include "file_io_utils.h"
#include "common/util.h"
#include "common/i18n.h" #include "common/i18n.h"
#include "translation_files.h" #include "translation_files.h"

View File

@ -31,7 +31,6 @@
#include "password.h" #include "password.h"
#include <iostream> #include <iostream>
#include <memory.h>
#include <stdio.h> #include <stdio.h>
#if defined(_WIN32) #if defined(_WIN32)
@ -42,8 +41,6 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
#include "memwipe.h"
#define EOT 0x4 #define EOT 0x4
namespace namespace

View File

@ -28,10 +28,6 @@
#include "misc_log_ex.h" #include "misc_log_ex.h"
#include "common/threadpool.h" #include "common/threadpool.h"
#include <cassert>
#include <limits>
#include <stdexcept>
#include "cryptonote_config.h" #include "cryptonote_config.h"
#include "common/util.h" #include "common/util.h"

View File

@ -34,7 +34,6 @@
#include <cstdint> #include <cstdint>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <memory>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/lock_guard.hpp> #include <boost/thread/lock_guard.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>

View File

@ -32,14 +32,11 @@
#include <cstddef> #include <cstddef>
#include <iostream> #include <iostream>
#include <boost/thread/mutex.hpp>
#include <boost/thread/lock_guard.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <type_traits> #include <type_traits>
#include <vector> #include <vector>
#include "common/pod-class.h" #include "common/pod-class.h"
#include "common/util.h"
#include "memwipe.h" #include "memwipe.h"
#include "mlocker.h" #include "mlocker.h"
#include "generic-ops.h" #include "generic-ops.h"

View File

@ -28,9 +28,6 @@
// //
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
#include "include_base_utils.h"
using namespace epee;
#include <atomic> #include <atomic>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include "wipeable_string.h" #include "wipeable_string.h"
@ -42,6 +39,8 @@ using namespace epee;
#include "crypto/hash.h" #include "crypto/hash.h"
#include "ringct/rctSigs.h" #include "ringct/rctSigs.h"
using namespace epee;
#undef MONERO_DEFAULT_LOG_CATEGORY #undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "cn" #define MONERO_DEFAULT_LOG_CATEGORY "cn"

View File

@ -33,8 +33,6 @@
#include <boost/utility/value_init.hpp> #include <boost/utility/value_init.hpp>
#include <boost/interprocess/detail/atomic.hpp> #include <boost/interprocess/detail/atomic.hpp>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/limits.hpp>
#include "include_base_utils.h"
#include "misc_language.h" #include "misc_language.h"
#include "syncobj.h" #include "syncobj.h"
#include "cryptonote_basic_impl.h" #include "cryptonote_basic_impl.h"
@ -54,9 +52,12 @@
#include <mach/mach_host.h> #include <mach/mach_host.h>
#include <AvailabilityMacros.h> #include <AvailabilityMacros.h>
#include <TargetConditionals.h> #include <TargetConditionals.h>
#endif #elif defined(__linux__)
#include <unistd.h>
#ifdef __FreeBSD__ #include <sys/resource.h>
#include <sys/times.h>
#include <time.h>
#elif defined(__FreeBSD__)
#include <devstat.h> #include <devstat.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>

View File

@ -38,11 +38,6 @@
#include "math_helper.h" #include "math_helper.h"
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#elif defined(__linux__)
#include <unistd.h>
#include <sys/resource.h>
#include <sys/times.h>
#include <time.h>
#endif #endif
namespace cryptonote namespace cryptonote

View File

@ -30,13 +30,11 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include "include_base_utils.h"
#include "string_tools.h" #include "string_tools.h"
using namespace epee; using namespace epee;
#include <unordered_set> #include <unordered_set>
#include "cryptonote_core.h" #include "cryptonote_core.h"
#include "common/command_line.h"
#include "common/util.h" #include "common/util.h"
#include "common/updates.h" #include "common/updates.h"
#include "common/download.h" #include "common/download.h"
@ -45,7 +43,6 @@ using namespace epee;
#include "warnings.h" #include "warnings.h"
#include "crypto/crypto.h" #include "crypto/crypto.h"
#include "cryptonote_config.h" #include "cryptonote_config.h"
#include "cryptonote_tx_utils.h"
#include "misc_language.h" #include "misc_language.h"
#include "file_io_utils.h" #include "file_io_utils.h"
#include <csignal> #include <csignal>

View File

@ -34,7 +34,6 @@
#include <boost/program_options/options_description.hpp> #include <boost/program_options/options_description.hpp>
#include <boost/program_options/variables_map.hpp> #include <boost/program_options/variables_map.hpp>
#include <boost/interprocess/sync/file_lock.hpp>
#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"

View File

@ -30,20 +30,8 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <boost/asio.hpp>
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <atomic>
#include <boost/asio.hpp>
#include <boost/array.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/thread/thread.hpp>
#include <memory> #include <memory>
@ -51,24 +39,14 @@
#include "net/net_utils_base.h" #include "net/net_utils_base.h"
#include "misc_log_ex.h" #include "misc_log_ex.h"
#include <boost/lambda/bind.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/uuid/random_generator.hpp>
#include <boost/chrono.hpp> #include <boost/chrono.hpp>
#include <boost/utility/value_init.hpp>
#include <boost/asio/deadline_timer.hpp>
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include "misc_language.h" #include "misc_language.h"
#include "pragma_comp_defs.h" #include "pragma_comp_defs.h"
#include <sstream>
#include <iomanip>
#include <algorithm> #include <algorithm>
#include <boost/asio/basic_socket.hpp>
#include <boost/asio/ip/unicast.hpp>
#include "cryptonote_protocol_handler.h" #include "cryptonote_protocol_handler.h"
#include "net/network_throttle.hpp" #include "net/network_throttle.hpp"

View File

@ -12,7 +12,6 @@
#include <unistd.h> #include <unistd.h>
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#include <sys/stat.h>
#ifndef TMPDIR #ifndef TMPDIR
#define TMPDIR "/tmp" #define TMPDIR "/tmp"

View File

@ -37,22 +37,14 @@
*/ */
#include <string> #include <string>
#include <cassert>
#include <map>
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
#include <unordered_map> #include <unordered_map>
#include <boost/algorithm/string.hpp>
#include "wipeable_string.h" #include "wipeable_string.h"
#include "misc_language.h" #include "misc_language.h"
#include "crypto/crypto.h" // for declaration of crypto::secret_key
#include <fstream>
#include "common/int-util.h" #include "common/int-util.h"
#include "mnemonics/electrum-words.h" #include "mnemonics/electrum-words.h"
#include <stdexcept>
#include <boost/filesystem.hpp>
#include <boost/crc.hpp> #include <boost/crc.hpp>
#include <boost/algorithm/string/join.hpp>
#include "chinese_simplified.h" #include "chinese_simplified.h"
#include "english.h" #include "english.h"

View File

@ -41,7 +41,6 @@
#include <string> #include <string>
#include <cstdint> #include <cstdint>
#include <map>
#include "crypto/crypto.h" // for declaration of crypto::secret_key #include "crypto/crypto.h" // for declaration of crypto::secret_key
namespace epee { class wipeable_string; } namespace epee { class wipeable_string; }

View File

@ -38,7 +38,9 @@
#include "cryptonote_config.h" #include "cryptonote_config.h"
#include "warnings.h" #include "warnings.h"
#include "net/levin_server_cp2.h" #include "net/abstract_tcp_server2.h"
#include "net/levin_protocol_handler.h"
#include "net/levin_protocol_handler_async.h"
#include "p2p_protocol_defs.h" #include "p2p_protocol_defs.h"
#include "storages/levin_abstract_invoke2.h" #include "storages/levin_abstract_invoke2.h"
#include "net_peerlist.h" #include "net_peerlist.h"

View File

@ -30,6 +30,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/lock_guard.hpp>
#include "misc_log_ex.h" #include "misc_log_ex.h"
#include "span.h" #include "span.h"
#include "common/perf_timer.h" #include "common/perf_timer.h"

View File

@ -27,7 +27,6 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "zmq_server.h" #include "zmq_server.h"
#include <boost/chrono/chrono.hpp>
namespace cryptonote namespace cryptonote
{ {

View File

@ -28,7 +28,6 @@
#include "node_rpc_proxy.h" #include "node_rpc_proxy.h"
#include "rpc/core_rpc_server_commands_defs.h" #include "rpc/core_rpc_server_commands_defs.h"
#include "common/json_util.h"
#include "storages/http_abstract_invoke.h" #include "storages/http_abstract_invoke.h"
using namespace epee; using namespace epee;

View File

@ -30,6 +30,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/range/adaptor/transformed.hpp> #include <boost/range/adaptor/transformed.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include "common/util.h"
#include "misc_log_ex.h" #include "misc_log_ex.h"
#include "misc_language.h" #include "misc_language.h"
#include "wallet_errors.h" #include "wallet_errors.h"

View File

@ -37,6 +37,7 @@
#include <boost/serialization/list.hpp> #include <boost/serialization/list.hpp>
#include <boost/serialization/vector.hpp> #include <boost/serialization/vector.hpp>
#include <boost/serialization/deque.hpp> #include <boost/serialization/deque.hpp>
#include <boost/thread/lock_guard.hpp>
#include <atomic> #include <atomic>
#include "include_base_utils.h" #include "include_base_utils.h"
@ -49,6 +50,7 @@
#include "cryptonote_basic/cryptonote_format_utils.h" #include "cryptonote_basic/cryptonote_format_utils.h"
#include "cryptonote_core/cryptonote_tx_utils.h" #include "cryptonote_core/cryptonote_tx_utils.h"
#include "common/unordered_containers_boost_serialization.h" #include "common/unordered_containers_boost_serialization.h"
#include "common/util.h"
#include "crypto/chacha.h" #include "crypto/chacha.h"
#include "crypto/hash.h" #include "crypto/hash.h"
#include "ringct/rctTypes.h" #include "ringct/rctTypes.h"

View File

@ -137,7 +137,6 @@ namespace net_load_tests
public: public:
open_close_test_helper(test_tcp_server& tcp_server, size_t open_request_target, size_t max_opened_connection_count) open_close_test_helper(test_tcp_server& tcp_server, size_t open_request_target, size_t max_opened_connection_count)
: m_tcp_server(tcp_server) : m_tcp_server(tcp_server)
, m_open_request_target(open_request_target)
, m_max_opened_connection_count(max_opened_connection_count) , m_max_opened_connection_count(max_opened_connection_count)
, m_opened_connection_count(0) , m_opened_connection_count(0)
, m_next_opened_conn_idx(0) , m_next_opened_conn_idx(0)
@ -203,7 +202,6 @@ namespace net_load_tests
private: private:
test_tcp_server& m_tcp_server; test_tcp_server& m_tcp_server;
size_t m_open_request_target;
size_t m_max_opened_connection_count; size_t m_max_opened_connection_count;
std::atomic<size_t> m_opened_connection_count; std::atomic<size_t> m_opened_connection_count;
std::atomic<size_t> m_next_opened_conn_idx; std::atomic<size_t> m_next_opened_conn_idx;

View File

@ -294,7 +294,7 @@ TEST_F(positive_test_connection_to_levin_protocol_handler_calls, handler_initial
TEST_F(positive_test_connection_to_levin_protocol_handler_calls, concurent_handler_initialization_and_destruction_is_correct) TEST_F(positive_test_connection_to_levin_protocol_handler_calls, concurent_handler_initialization_and_destruction_is_correct)
{ {
const size_t connection_count = 10000; const size_t connection_count = 10000;
auto create_and_destroy_connections = [this, connection_count]() auto create_and_destroy_connections = [this]()
{ {
std::vector<test_connection_ptr> connections(connection_count); std::vector<test_connection_ptr> connections(connection_count);
for (size_t i = 0; i < connection_count; ++i) for (size_t i = 0; i < connection_count; ++i)