mirror of
https://github.com/jwinterm/wownero.git
synced 2026-11-09 08:13:54 +01:00
move includes around to lessen overall load
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include <db_cxx.h>
|
||||
|
||||
#include "blockchain_db/blockchain_db.h"
|
||||
#include "cryptonote_protocol/blobdatatype.h" // for type blobdata
|
||||
#include "cryptonote_basic/blobdatatype.h" // for type blobdata
|
||||
|
||||
#include <unordered_map>
|
||||
#include <condition_variable>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
|
||||
#include "string_tools.h"
|
||||
#include "blockchain_db.h"
|
||||
#include "cryptonote_basic/cryptonote_format_utils.h"
|
||||
#include "profile_tools.h"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <boost/program_options.hpp>
|
||||
#include "common/command_line.h"
|
||||
#include "crypto/hash.h"
|
||||
#include "cryptonote_protocol/blobdatatype.h"
|
||||
#include "cryptonote_basic/blobdatatype.h"
|
||||
#include "cryptonote_basic/cryptonote_basic.h"
|
||||
#include "cryptonote_basic/difficulty.h"
|
||||
#include "cryptonote_basic/hardfork.h"
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <cstring> // memcpy
|
||||
#include <random>
|
||||
|
||||
#include "string_tools.h"
|
||||
#include "common/util.h"
|
||||
#include "cryptonote_basic/cryptonote_format_utils.h"
|
||||
#include "crypto/crypto.h"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <atomic>
|
||||
|
||||
#include "blockchain_db/blockchain_db.h"
|
||||
#include "cryptonote_protocol/blobdatatype.h" // for type blobdata
|
||||
#include "cryptonote_basic/blobdatatype.h" // for type blobdata
|
||||
#include "ringct/rctTypes.h"
|
||||
#include <boost/thread/tss.hpp>
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <fstream>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "misc_log_ex.h"
|
||||
#include "bootstrap_file.h"
|
||||
#include "bootstrap_serialization.h"
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
#include <boost/iostreams/stream_buffer.hpp>
|
||||
#include <boost/iostreams/stream.hpp>
|
||||
#include <boost/iostreams/device/back_inserter.hpp>
|
||||
|
||||
#include <boost/iostreams/filtering_streambuf.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
|
||||
#include "cryptonote_basic/cryptonote_basic.h"
|
||||
#include "cryptonote_basic/cryptonote_boost_serialization.h"
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
#include <boost/iostreams/stream_buffer.hpp>
|
||||
#include <boost/iostreams/stream.hpp>
|
||||
#include <boost/iostreams/device/back_inserter.hpp>
|
||||
|
||||
#include <boost/iostreams/filtering_streambuf.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
|
||||
#include "cryptonote_basic/cryptonote_basic.h"
|
||||
#include "cryptonote_core/blockchain.h"
|
||||
|
||||
@@ -36,15 +36,38 @@ using namespace epee;
|
||||
|
||||
#include "common/dns_utils.h"
|
||||
#include "include_base_utils.h"
|
||||
#include "string_tools.h"
|
||||
#include "storages/portable_storage_template_helper.h" // epee json include
|
||||
#include <sstream>
|
||||
#include <random>
|
||||
#include "serialization/keyvalue_serialization.h"
|
||||
|
||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||
#define MONERO_DEFAULT_LOG_CATEGORY "checkpoints"
|
||||
|
||||
namespace cryptonote
|
||||
{
|
||||
/**
|
||||
* @brief struct for loading a checkpoint from json
|
||||
*/
|
||||
struct t_hashline
|
||||
{
|
||||
uint64_t height; //!< the height of the checkpoint
|
||||
std::string hash; //!< the hash for the checkpoint
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(height)
|
||||
KV_SERIALIZE(hash)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief struct for loading many checkpoints from json
|
||||
*/
|
||||
struct t_hash_json {
|
||||
std::vector<t_hashline> hashlines; //!< the checkpoint lines from the file
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(hashlines)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
checkpoints::checkpoints()
|
||||
{
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <vector>
|
||||
#include "misc_log_ex.h"
|
||||
#include "crypto/hash.h"
|
||||
#include "serialization/keyvalue_serialization.h"
|
||||
|
||||
#define ADD_CHECKPOINT(h, hash) CHECK_AND_ASSERT(add_checkpoint(h, hash), false);
|
||||
#define JSON_HASH_FILE_NAME "checkpoints.json"
|
||||
@@ -187,32 +186,7 @@ namespace cryptonote
|
||||
bool load_checkpoints_from_dns(bool testnet = false);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
/**
|
||||
* @brief struct for loading a checkpoint from json
|
||||
*/
|
||||
struct t_hashline
|
||||
{
|
||||
uint64_t height; //!< the height of the checkpoint
|
||||
std::string hash; //!< the hash for the checkpoint
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(height)
|
||||
KV_SERIALIZE(hash)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief struct for loading many checkpoints from json
|
||||
*/
|
||||
struct t_hash_json {
|
||||
std::vector<t_hashline> hashlines; //!< the checkpoint lines from the file
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(hashlines)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
std::map<uint64_t, crypto::hash> m_points; //!< the checkpoints container
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <boost/archive/binary_iarchive.hpp>
|
||||
#include <boost/archive/portable_binary_oarchive.hpp>
|
||||
#include <boost/archive/portable_binary_iarchive.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
|
||||
|
||||
namespace tools
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "include_base_utils.h"
|
||||
#include <random>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
using namespace epee;
|
||||
namespace bf = boost::filesystem;
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
// 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.
|
||||
|
||||
#include <vector>
|
||||
#include "misc_os_dependent.h"
|
||||
#include "perf_timer.h"
|
||||
|
||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||
@@ -35,7 +37,8 @@ namespace tools
|
||||
{
|
||||
|
||||
el::Level performance_timer_log_level = el::Level::Debug;
|
||||
__thread std::vector<PerformanceTimer*> *performance_timers = NULL;
|
||||
|
||||
static __thread std::vector<PerformanceTimer*> *performance_timers = NULL;
|
||||
|
||||
void set_performance_timer_log_level(el::Level level)
|
||||
{
|
||||
@@ -48,4 +51,38 @@ void set_performance_timer_log_level(el::Level level)
|
||||
performance_timer_log_level = level;
|
||||
}
|
||||
|
||||
PerformanceTimer::PerformanceTimer(const std::string &s, uint64_t unit, el::Level l): name(s), unit(unit), level(l), started(false)
|
||||
{
|
||||
ticks = epee::misc_utils::get_ns_count();
|
||||
if (!performance_timers)
|
||||
{
|
||||
MLOG(level, "PERF ----------");
|
||||
performance_timers = new std::vector<PerformanceTimer*>();
|
||||
}
|
||||
else
|
||||
{
|
||||
PerformanceTimer *pt = performance_timers->back();
|
||||
if (!pt->started)
|
||||
{
|
||||
MLOG(pt->level, "PERF " << std::string((performance_timers->size()-1) * 2, ' ') << " " << pt->name);
|
||||
pt->started = true;
|
||||
}
|
||||
}
|
||||
performance_timers->push_back(this);
|
||||
}
|
||||
|
||||
PerformanceTimer::~PerformanceTimer()
|
||||
{
|
||||
performance_timers->pop_back();
|
||||
ticks = epee::misc_utils::get_ns_count() - ticks;
|
||||
char s[12];
|
||||
snprintf(s, sizeof(s), "%8llu ", (unsigned long long)ticks / (1000000000 / unit));
|
||||
MLOG(level, "PERF " << s << std::string(performance_timers->size() * 2, ' ') << " " << name);
|
||||
if (performance_timers->empty())
|
||||
{
|
||||
delete performance_timers;
|
||||
performance_timers = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-34
@@ -41,44 +41,12 @@ namespace tools
|
||||
class PerformanceTimer;
|
||||
|
||||
extern el::Level performance_timer_log_level;
|
||||
extern __thread std::vector<PerformanceTimer*> *performance_timers;
|
||||
|
||||
class PerformanceTimer
|
||||
{
|
||||
public:
|
||||
PerformanceTimer(const std::string &s, uint64_t unit, el::Level l = el::Level::Debug): name(s), unit(unit), level(l), started(false)
|
||||
{
|
||||
ticks = epee::misc_utils::get_ns_count();
|
||||
if (!performance_timers)
|
||||
{
|
||||
MLOG(level, "PERF ----------");
|
||||
performance_timers = new std::vector<PerformanceTimer*>();
|
||||
}
|
||||
else
|
||||
{
|
||||
PerformanceTimer *pt = performance_timers->back();
|
||||
if (!pt->started)
|
||||
{
|
||||
MLOG(pt->level, "PERF " << std::string((performance_timers->size()-1) * 2, ' ') << " " << pt->name);
|
||||
pt->started = true;
|
||||
}
|
||||
}
|
||||
performance_timers->push_back(this);
|
||||
}
|
||||
|
||||
~PerformanceTimer()
|
||||
{
|
||||
performance_timers->pop_back();
|
||||
ticks = epee::misc_utils::get_ns_count() - ticks;
|
||||
char s[12];
|
||||
snprintf(s, sizeof(s), "%8llu ", (unsigned long long)ticks / (1000000000 / unit));
|
||||
MLOG(level, "PERF " << s << std::string(performance_timers->size() * 2, ' ') << " " << name);
|
||||
if (performance_timers->empty())
|
||||
{
|
||||
delete performance_timers;
|
||||
performance_timers = NULL;
|
||||
}
|
||||
}
|
||||
PerformanceTimer(const std::string &s, uint64_t unit, el::Level l = el::Level::Debug);
|
||||
~PerformanceTimer();
|
||||
|
||||
private:
|
||||
std::string name;
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#ifndef STATICLIB
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "common/stack_trace.h"
|
||||
#include "misc_log_ex.h"
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
// 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.
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "misc_log_ex.h"
|
||||
#include "util.h"
|
||||
#include "dns_utils.h"
|
||||
|
||||
@@ -54,6 +54,7 @@ using namespace epee;
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
using namespace epee;
|
||||
|
||||
#include <atomic>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "wipeable_string.h"
|
||||
#include "string_tools.h"
|
||||
#include "cryptonote_format_utils.h"
|
||||
#include "cryptonote_config.h"
|
||||
#include "crypto/crypto.h"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#pragma once
|
||||
#include "cryptonote_protocol/cryptonote_protocol_defs.h"
|
||||
#include "blobdatatype.h"
|
||||
#include "cryptonote_basic_impl.h"
|
||||
#include "account.h"
|
||||
#include "subaddress_index.h"
|
||||
|
||||
@@ -32,14 +32,17 @@
|
||||
#include <numeric>
|
||||
#include <boost/utility/value_init.hpp>
|
||||
#include <boost/interprocess/detail/atomic.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/limits.hpp>
|
||||
#include "misc_language.h"
|
||||
#include "include_base_utils.h"
|
||||
#include "misc_language.h"
|
||||
#include "syncobj.h"
|
||||
#include "cryptonote_basic_impl.h"
|
||||
#include "cryptonote_format_utils.h"
|
||||
#include "file_io_utils.h"
|
||||
#include "common/command_line.h"
|
||||
#include "string_coding.h"
|
||||
#include "string_tools.h"
|
||||
#include "storages/portable_storage_template_helper.h"
|
||||
#include "boost/logic/tribool.hpp"
|
||||
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
//
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "include_base_utils.h"
|
||||
#include "string_tools.h"
|
||||
using namespace epee;
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include <boost/program_options/variables_map.hpp>
|
||||
#include <boost/interprocess/sync/file_lock.hpp>
|
||||
|
||||
#include "p2p/net_node_common.h"
|
||||
#include "cryptonote_protocol/cryptonote_protocol_handler_common.h"
|
||||
#include "storages/portable_storage_template_helper.h"
|
||||
#include "common/download.h"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <unordered_set>
|
||||
#include "include_base_utils.h"
|
||||
#include "string_tools.h"
|
||||
using namespace epee;
|
||||
|
||||
#include "common/apply_permutation.h"
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include <boost/uuid/nil_generator.hpp>
|
||||
#include "string_tools.h"
|
||||
#include "cryptonote_protocol_defs.h"
|
||||
#include "block_queue.h"
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <list>
|
||||
#include "serialization/keyvalue_serialization.h"
|
||||
#include "cryptonote_basic/cryptonote_basic.h"
|
||||
#include "cryptonote_protocol/blobdatatype.h"
|
||||
#include "cryptonote_basic/blobdatatype.h"
|
||||
namespace cryptonote
|
||||
{
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ set(daemon_private_headers
|
||||
rpc_command_executor.h
|
||||
|
||||
# cryptonote_protocol
|
||||
../cryptonote_protocol/blobdatatype.h
|
||||
../cryptonote_protocol/cryptonote_protocol_defs.h
|
||||
../cryptonote_protocol/cryptonote_protocol_handler.h
|
||||
../cryptonote_protocol/cryptonote_protocol_handler.inl
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
// 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.
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "cryptonote_config.h"
|
||||
#include "version.h"
|
||||
#include "string_tools.h"
|
||||
#include "daemon/command_server.h"
|
||||
|
||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include "misc_log_ex.h"
|
||||
#include "daemon/daemon.h"
|
||||
#include "rpc/daemon_handler.h"
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <boost/program_options/options_description.hpp>
|
||||
#include <boost/program_options/variables_map.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||
#define MONERO_DEFAULT_LOG_CATEGORY "daemon"
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
// 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.
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include "cryptonote_basic/cryptonote_basic.h"
|
||||
#include "cryptonote_basic/tx_extra.h"
|
||||
#include "cryptonote_core/blockchain.h"
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "serialization/keyvalue_serialization.h"
|
||||
#include "net/net_utils_base.h"
|
||||
#include "misc_language.h"
|
||||
#include "string_tools.h"
|
||||
#include "time_helper.h"
|
||||
#include "cryptonote_config.h"
|
||||
#ifdef ALLOW_DEBUG_COMMANDS
|
||||
#include "crypto/crypto.h"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
// 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.
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include "misc_log_ex.h"
|
||||
#include "rctOps.h"
|
||||
using namespace crypto;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#include "include_base_utils.h"
|
||||
#include "string_tools.h"
|
||||
using namespace epee;
|
||||
|
||||
#include "core_rpc_server.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
// but including here for clarity
|
||||
#include "cryptonote_core/cryptonote_core.h"
|
||||
#include "cryptonote_basic/cryptonote_format_utils.h"
|
||||
#include "cryptonote_protocol/blobdatatype.h"
|
||||
#include "cryptonote_basic/blobdatatype.h"
|
||||
#include "ringct/rctSigs.h"
|
||||
|
||||
namespace cryptonote
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/asio/ip/address.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include "common/command_line.h"
|
||||
#include "common/i18n.h"
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "string_tools.h"
|
||||
#include "rapidjson/document.h"
|
||||
#include "cryptonote_basic/cryptonote_basic.h"
|
||||
#include "rpc/message_data_structs.h"
|
||||
|
||||
@@ -28,12 +28,15 @@
|
||||
//
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#include <numeric>
|
||||
#include <random>
|
||||
#include <tuple>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/optional/optional.hpp>
|
||||
#include <boost/utility/value_init.hpp>
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include "include_base_utils.h"
|
||||
using namespace epee;
|
||||
|
||||
@@ -49,7 +52,7 @@ using namespace epee;
|
||||
#include "profile_tools.h"
|
||||
#include "crypto/crypto.h"
|
||||
#include "serialization/binary_utils.h"
|
||||
#include "cryptonote_protocol/blobdatatype.h"
|
||||
#include "cryptonote_basic/blobdatatype.h"
|
||||
#include "mnemonics/electrum-words.h"
|
||||
#include "common/i18n.h"
|
||||
#include "common/util.h"
|
||||
|
||||
@@ -59,8 +59,6 @@
|
||||
#include "common/password.h"
|
||||
#include "node_rpc_proxy.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||
#define MONERO_DEFAULT_LOG_CATEGORY "wallet.wallet2"
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "wallet/wallet_args.h"
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include "common/i18n.h"
|
||||
#include "common/util.h"
|
||||
|
||||
Reference in New Issue
Block a user