Improve wallet logging
This commit is contained in:
parent
7c2cde87d3
commit
8e8509de2a
4 changed files with 12 additions and 5 deletions
|
|
@ -103,7 +103,7 @@ void nano::daemon::run (std::filesystem::path const & data_path, nano::node_flag
|
||||||
logger.info (nano::log::type::daemon, "Starting up Nano node...");
|
logger.info (nano::log::type::daemon, "Starting up Nano node...");
|
||||||
|
|
||||||
// Print info about number of logical cores detected, those are used to decide how many IO, worker and signature checker threads to spawn
|
// Print info about number of logical cores detected, those are used to decide how many IO, worker and signature checker threads to spawn
|
||||||
logger.info (nano::log::type::daemon, "Hardware concurrency: {} ( configured: {} )", std::thread::hardware_concurrency (), nano::hardware_concurrency ());
|
logger.info (nano::log::type::daemon, "Hardware concurrency: {} (configured: {})", std::thread::hardware_concurrency (), nano::hardware_concurrency ());
|
||||||
logger.info (nano::log::type::daemon, "File descriptors limit: {}", nano::get_file_descriptor_limit ());
|
logger.info (nano::log::type::daemon, "File descriptors limit: {}", nano::get_file_descriptor_limit ());
|
||||||
|
|
||||||
// for the daemon start up, if the user hasn't specified a port in
|
// for the daemon start up, if the user hasn't specified a port in
|
||||||
|
|
|
||||||
|
|
@ -1245,7 +1245,7 @@ bool nano::wallet::search_receivable (store::transaction const & wallet_transact
|
||||||
auto result (!store.valid_password (wallet_transaction_a));
|
auto result (!store.valid_password (wallet_transaction_a));
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
logger.info (nano::log::type::wallet, "Beginning receivable block search");
|
logger.debug (nano::log::type::wallet, "Beginning receivable block search");
|
||||||
|
|
||||||
for (auto i (store.begin (wallet_transaction_a)), n (store.end (wallet_transaction_a)); i != n; ++i)
|
for (auto i (store.begin (wallet_transaction_a)), n (store.end (wallet_transaction_a)); i != n; ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -1284,11 +1284,11 @@ bool nano::wallet::search_receivable (store::transaction const & wallet_transact
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info (nano::log::type::wallet, "Receivable block search phase complete");
|
logger.debug (nano::log::type::wallet, "Receivable block search phase complete");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logger.warn (nano::log::type::wallet, "Unable to search receivable blocks, wallet is locked");
|
logger.warn (nano::log::type::wallet, "Unable to search receivable blocks, wallet is locked. Blocks won't be auto-received until the wallet is unlocked");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -1431,6 +1431,8 @@ nano::wallets::wallets (bool error_a, nano::node & node_a) :
|
||||||
env (boost::polymorphic_downcast<nano::mdb_wallets_store *> (node_a.wallets_store_impl.get ())->environment),
|
env (boost::polymorphic_downcast<nano::mdb_wallets_store *> (node_a.wallets_store_impl.get ())->environment),
|
||||||
stopped (false)
|
stopped (false)
|
||||||
{
|
{
|
||||||
|
logger.info (nano::log::type::wallet, "Loading wallets from: {}", env.database_path.string ());
|
||||||
|
|
||||||
nano::unique_lock<nano::mutex> lock{ mutex };
|
nano::unique_lock<nano::mutex> lock{ mutex };
|
||||||
if (!error_a)
|
if (!error_a)
|
||||||
{
|
{
|
||||||
|
|
@ -1462,6 +1464,9 @@ nano::wallets::wallets (bool error_a, nano::node & node_a) :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.info (nano::log::type::wallet, "Found {} wallet(s)", items.size ());
|
||||||
|
|
||||||
// Backup before upgrade wallets
|
// Backup before upgrade wallets
|
||||||
bool backup_required (false);
|
bool backup_required (false);
|
||||||
if (node.config.backup_before_upgrade)
|
if (node.config.backup_before_upgrade)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
#include <boost/system/error_code.hpp>
|
#include <boost/system/error_code.hpp>
|
||||||
|
|
||||||
nano::store::lmdb::env::env (bool & error_a, std::filesystem::path const & path_a, nano::store::lmdb::env::options options_a)
|
nano::store::lmdb::env::env (bool & error_a, std::filesystem::path const & path_a, nano::store::lmdb::env::options options_a) :
|
||||||
|
database_path{ path_a }
|
||||||
{
|
{
|
||||||
init (error_a, path_a, options_a);
|
init (error_a, path_a, options_a);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,5 +64,6 @@ public:
|
||||||
MDB_txn * tx (store::transaction const & transaction_a) const;
|
MDB_txn * tx (store::transaction const & transaction_a) const;
|
||||||
std::unique_ptr<MDB_env, decltype (&mdb_env_close)> environment{ nullptr, mdb_env_close };
|
std::unique_ptr<MDB_env, decltype (&mdb_env_close)> environment{ nullptr, mdb_env_close };
|
||||||
nano::id_t const store_id{ nano::next_id () };
|
nano::id_t const store_id{ nano::next_id () };
|
||||||
|
std::filesystem::path const database_path;
|
||||||
};
|
};
|
||||||
} // namespace nano::store::lmdb
|
} // namespace nano::store::lmdb
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue