1
0
Fork 0
forked from lthn/blockchain

added more logs and fixed sync progress

This commit is contained in:
cryptozoidberg 2020-07-15 18:15:11 +02:00
parent e5694f51f2
commit 53ecfef369
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
3 changed files with 11 additions and 2 deletions

View file

@ -23,6 +23,12 @@
#include <dbghelp.h>
#endif
#ifdef NDEBUG
#define BUILD_TYPE "Release"
#else
#define BUILD_TYPE "Debug"
#endif
namespace tools
{
std::string get_host_computer_name();

View file

@ -187,7 +187,6 @@ namespace plain_wallet
epee::static_helpers::set_or_call_on_destruct(true, static_destroy_handler);
std::cout << "[INIT PLAIN_WALLET_INSTANCE]" << ENDL;
std::shared_ptr<plain_wallet_instance> ptr(new plain_wallet_instance());
set_bundle_working_dir(working_dir);
@ -208,13 +207,15 @@ namespace plain_wallet
}
ptr->gwm.set_use_deffered_global_outputs(true);
if(!ptr->gwm.start())
{
LOG_ERROR("Failed to start wallets_manager");
return GENERAL_INTERNAL_ERRROR_INIT;
}
LOG_PRINT_L0("[INIT PLAIN_WALLET_INSTANCE] Ver:" << PROJECT_VERSION_LONG << "(" << BUILD_TYPE << ")");
std::string wallets_folder = get_wallets_folder();
boost::system::error_code ec;
boost::filesystem::create_directories(wallets_folder, ec);

View file

@ -1339,6 +1339,8 @@ void wallet2::pull_blocks(size_t& blocks_added, std::atomic<bool>& stop)
req.minimum_height = get_wallet_minimum_height();
if (is_auditable())
req.need_global_indexes = true;
if (req.minimum_height > m_height_of_start_sync)
m_height_of_start_sync = req.minimum_height;
m_chain.get_short_chain_history(req.block_ids);
bool r = m_core_proxy->call_COMMAND_RPC_GET_BLOCKS_DIRECT(req, res);