diff --git a/src/common/util.h b/src/common/util.h index 6b683082..0c5b0bb1 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -23,6 +23,12 @@ #include #endif +#ifdef NDEBUG + #define BUILD_TYPE "Release" +#else + #define BUILD_TYPE "Debug" +#endif + namespace tools { std::string get_host_computer_name(); diff --git a/src/wallet/plain_wallet_api.cpp b/src/wallet/plain_wallet_api.cpp index 084112d6..ef8e0ff9 100644 --- a/src/wallet/plain_wallet_api.cpp +++ b/src/wallet/plain_wallet_api.cpp @@ -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 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); diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index f4e78ff1..b78ea372 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1339,6 +1339,8 @@ void wallet2::pull_blocks(size_t& blocks_added, std::atomic& 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);