remove unused code and fix some warnings

This commit is contained in:
Maxim Shishmarev 2019-04-23 13:09:26 +10:00
parent 792ed6f044
commit 6ecfd17053
5 changed files with 11 additions and 13 deletions

View file

@ -586,9 +586,7 @@ void connection_t::handle_wrong_swarm(const std::string& pubKey) {
BOOST_LOG_TRIVIAL(info) << "Client request for different swarm received";
}
constexpr auto DB_POLL_INTERVAL = std::chrono::milliseconds(200);
constexpr auto LONG_POLL_TIMEOUT = std::chrono::milliseconds(20000);
constexpr uint32_t DB_POLL_LIMIT = LONG_POLL_TIMEOUT / DB_POLL_INTERVAL;
template <typename T>
void connection_t::respond_with_messages(const std::vector<T>& items) {

View file

@ -23,7 +23,7 @@ using response_t = http::response<http::string_body>;
namespace service_node {
namespace storage {
class Item;
struct Item;
}
} // namespace service_node
@ -32,7 +32,7 @@ using service_node::storage::Item;
namespace loki {
using swarm_callback_t = std::function<void(const all_swarms_t&)>;
class message_t;
struct message_t;
enum class SNodeError { NO_ERROR, ERROR_OTHER, NO_REACH };
@ -115,15 +115,15 @@ class connection_t : public std::enable_shared_from_this<connection_t> {
// as opposed to directly after connection_t::process_request
bool delay_response_ = false;
/// TODO: move these if possible
std::map<std::string, std::string> header_;
ServiceNode& service_node_;
ChannelEncryption<std::string>& channelCipher_;
// The timer for putting a deadline on connection processing.
boost::asio::steady_timer deadline_;
ServiceNode& service_node_;
ChannelEncryption<std::string>& channelCipher_;
/// TODO: move these if possible
std::map<std::string, std::string> header_;
std::stringstream bodyStream_;

View file

@ -5,13 +5,13 @@
namespace service_node {
namespace storage {
class Item;
struct Item;
}
} // namespace service_node
namespace loki {
class message_t;
struct message_t;
template <typename T>
void serialize_message(std::string& buf, const T& msg);

View file

@ -18,7 +18,7 @@ class Database;
namespace service_node {
namespace storage {
class Item;
struct Item;
} // namespace storage
} // namespace service_node

View file

@ -8,7 +8,7 @@
namespace boost {
namespace asio {
struct io_context;
class io_context;
}
} // namespace boost