From 3e4f21ba9842d767044155c926ee85bebe944361 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Tue, 16 May 2023 12:39:54 +0200 Subject: Added some info messages related to Stellar login Something doesn't seem to be working right... --- src/account-server/accounthandler.cpp | 4 ++++ src/account-server/storage.cpp | 2 +- src/dal/recordset.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp index 6c1e10c8..4a4c73cf 100644 --- a/src/account-server/accounthandler.cpp +++ b/src/account-server/accounthandler.cpp @@ -1093,6 +1093,8 @@ void AccountHandler::handleStellarLogin(const std::string &token, const std::str auto acc = storage->getAccount(pubKey); if (acc) { + LOG_INFO("Stellar login: Found existing account for public key " << pubKey << ", ID " << acc->getID()); + // Set lastLogin date of the account. time_t login; time(&login); @@ -1110,6 +1112,8 @@ void AccountHandler::handleStellarLogin(const std::string &token, const std::str { // On-demand account creation for public keys acc = createAccount(pubKey, std::string(), std::string()); + + LOG_INFO("Stellar login: Created account for public key " << pubKey << ", ID " << acc->getID()); } MessageOut reply(APMSG_LOGIN_RESPONSE); diff --git a/src/account-server/storage.cpp b/src/account-server/storage.cpp index 9ff25f69..a1270dca 100644 --- a/src/account-server/storage.cpp +++ b/src/account-server/storage.cpp @@ -890,7 +890,7 @@ bool Storage::updateCharacter(const CharacterData &character) void Storage::addAccount(Account &account) { - assert(account.getCharacters().size() == 0); + assert(account.getCharacters().empty()); using namespace dal; diff --git a/src/dal/recordset.cpp b/src/dal/recordset.cpp index 69104933..1c9d2879 100644 --- a/src/dal/recordset.cpp +++ b/src/dal/recordset.cpp @@ -53,7 +53,7 @@ void RecordSet::clear() */ bool RecordSet::isEmpty() const { - return mRows.size() == 0; + return mRows.empty(); } /** -- cgit v1.2.3-70-g09d2