move connection_basic and network_throttle from src/p2p to epee

These even had the epee namespace.
This fixes some ugly circular dependencies.
This commit is contained in:
moneromooo-monero 2017-11-29 19:30:06 +00:00
parent 4abf25f3c9
commit bb89ae8b20
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
11 changed files with 15 additions and 14 deletions

View file

@ -54,8 +54,8 @@
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include "net_utils_base.h" #include "net_utils_base.h"
#include "syncobj.h" #include "syncobj.h"
#include "../../../../src/p2p/connection_basic.hpp" #include "connection_basic.hpp"
#include "../../../../src/p2p/network_throttle-detail.hpp" #include "network_throttle-detail.hpp"
#undef MONERO_DEFAULT_LOG_CATEGORY #undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net" #define MONERO_DEFAULT_LOG_CATEGORY "net"

View file

@ -33,8 +33,8 @@
/* rfree: throttle details, implementing rate limiting */ /* rfree: throttle details, implementing rate limiting */
#ifndef INCLUDED_src_p2p_throttle_detail_hpp #ifndef INCLUDED_throttle_detail_hpp
#define INCLUDED_src_p2p_throttle_detail_hpp #define INCLUDED_throttle_detail_hpp
#include "network_throttle.hpp" #include "network_throttle.hpp"

View file

@ -34,8 +34,8 @@
/* rfree: also includes the manager for singeton/global such objects */ /* rfree: also includes the manager for singeton/global such objects */
#ifndef INCLUDED_p2p_network_throttle_hpp #ifndef INCLUDED_network_throttle_hpp
#define INCLUDED_p2p_network_throttle_hpp #define INCLUDED_network_throttle_hpp
#include <boost/asio.hpp> #include <boost/asio.hpp>
#include <string> #include <string>

View file

@ -26,7 +26,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.
add_library(epee STATIC hex.cpp http_auth.cpp mlog.cpp net_utils_base.cpp string_tools.cpp wipeable_string.cpp) add_library(epee STATIC hex.cpp http_auth.cpp mlog.cpp net_utils_base.cpp string_tools.cpp wipeable_string.cpp
connection_basic.cpp network_throttle.cpp network_throttle-detail.cpp)
if (USE_READLINE AND GNU_READLINE_FOUND) if (USE_READLINE AND GNU_READLINE_FOUND)
add_library(epee_readline STATIC readline_buffer.cpp) add_library(epee_readline STATIC readline_buffer.cpp)
endif() endif()

View file

@ -32,7 +32,7 @@
/* rfree: implementation for the non-template base, can be used by connection<> template class in abstract_tcp_server2 file */ /* rfree: implementation for the non-template base, can be used by connection<> template class in abstract_tcp_server2 file */
#include "connection_basic.hpp" #include "net/connection_basic.hpp"
#include <boost/asio.hpp> #include <boost/asio.hpp>
#include <string> #include <string>
@ -77,7 +77,7 @@
#include "net/abstract_tcp_server2.h" #include "net/abstract_tcp_server2.h"
// TODO: // TODO:
#include "network_throttle-detail.hpp" #include "net/network_throttle-detail.hpp"
#include "cryptonote_core/cryptonote_core.h" #include "cryptonote_core/cryptonote_core.h"
#undef MONERO_DEFAULT_LOG_CATEGORY #undef MONERO_DEFAULT_LOG_CATEGORY

View file

@ -74,7 +74,7 @@
#include "net/abstract_tcp_server2.h" #include "net/abstract_tcp_server2.h"
// TODO: // TODO:
#include "network_throttle-detail.hpp" #include "net/network_throttle-detail.hpp"
#undef MONERO_DEFAULT_LOG_CATEGORY #undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.throttle" #define MONERO_DEFAULT_LOG_CATEGORY "net.throttle"

View file

@ -54,7 +54,7 @@ Throttling work by:
// 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 "network_throttle-detail.hpp" #include "net/network_throttle-detail.hpp"
namespace epee namespace epee
{ {

View file

@ -70,7 +70,7 @@
#include <boost/asio/ip/unicast.hpp> #include <boost/asio/ip/unicast.hpp>
#include "cryptonote_protocol_handler.h" #include "cryptonote_protocol_handler.h"
#include "p2p/network_throttle.hpp" #include "net/network_throttle.hpp"
#include "cryptonote_core/cryptonote_core.h" // e.g. for the send_stop_signal() #include "cryptonote_core/cryptonote_core.h" // e.g. for the send_stop_signal()

View file

@ -41,7 +41,7 @@
#include "cryptonote_basic/cryptonote_format_utils.h" #include "cryptonote_basic/cryptonote_format_utils.h"
#include "profile_tools.h" #include "profile_tools.h"
#include "p2p/network_throttle-detail.hpp" #include "net/network_throttle-detail.hpp"
#undef MONERO_DEFAULT_LOG_CATEGORY #undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.cn" #define MONERO_DEFAULT_LOG_CATEGORY "net.cn"

View file

@ -31,7 +31,7 @@
#include "cryptonote_basic/tx_extra.h" #include "cryptonote_basic/tx_extra.h"
#include "cryptonote_core/blockchain.h" #include "cryptonote_core/blockchain.h"
#include "p2p/p2p_protocol_defs.h" #include "p2p/p2p_protocol_defs.h"
#include "p2p/connection_basic.hpp" #include "net/connection_basic.hpp"
#include "p2p/net_peerlist.h" #include "p2p/net_peerlist.h"
#include "p2p/net_node.h" #include "p2p/net_node.h"
#include "cryptonote_protocol/cryptonote_protocol_handler.h" #include "cryptonote_protocol/cryptonote_protocol_handler.h"