Skip to content

Commit 5262fde

Browse files
paveljaniktheuni
authored andcommitted
Remove whitespaces before double colon in errors and logs
1 parent 3800135 commit 5262fde

28 files changed

+217
-217
lines changed

src/alert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ bool CAlert::CheckSignature() const
149149
{
150150
CPubKey key(Params().AlertKey());
151151
if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig))
152-
return error("CAlert::CheckSignature() : verify signature failed");
152+
return error("CAlert::CheckSignature(): verify signature failed");
153153

154154
// Now unserialize the data
155155
CDataStream sMsg(vchMsg, SER_NETWORK, PROTOCOL_VERSION);

src/db.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void CDBEnv::EnvShutdown()
4343
fDbEnvInit = false;
4444
int ret = dbenv.close(0);
4545
if (ret != 0)
46-
LogPrintf("CDBEnv::EnvShutdown : Error %d shutting down database environment: %s\n", ret, DbEnv::strerror(ret));
46+
LogPrintf("CDBEnv::EnvShutdown: Error %d shutting down database environment: %s\n", ret, DbEnv::strerror(ret));
4747
if (!fMockDb)
4848
DbEnv(0).remove(path.string().c_str(), 0);
4949
}
@@ -75,7 +75,7 @@ bool CDBEnv::Open(const boost::filesystem::path& pathIn)
7575
boost::filesystem::path pathLogDir = path / "database";
7676
TryCreateDirectory(pathLogDir);
7777
boost::filesystem::path pathErrorFile = path / "db.log";
78-
LogPrintf("CDBEnv::Open : LogDir=%s ErrorFile=%s\n", pathLogDir.string(), pathErrorFile.string());
78+
LogPrintf("CDBEnv::Open: LogDir=%s ErrorFile=%s\n", pathLogDir.string(), pathErrorFile.string());
7979

8080
unsigned int nEnvFlags = 0;
8181
if (GetBoolArg("-privdb", true))
@@ -102,7 +102,7 @@ bool CDBEnv::Open(const boost::filesystem::path& pathIn)
102102
nEnvFlags,
103103
S_IRUSR | S_IWUSR);
104104
if (ret != 0)
105-
return error("CDBEnv::Open : Error %d opening database environment: %s\n", ret, DbEnv::strerror(ret));
105+
return error("CDBEnv::Open: Error %d opening database environment: %s\n", ret, DbEnv::strerror(ret));
106106

107107
fDbEnvInit = true;
108108
fMockDb = false;
@@ -112,7 +112,7 @@ bool CDBEnv::Open(const boost::filesystem::path& pathIn)
112112
void CDBEnv::MakeMock()
113113
{
114114
if (fDbEnvInit)
115-
throw runtime_error("CDBEnv::MakeMock : Already initialized");
115+
throw runtime_error("CDBEnv::MakeMock: Already initialized");
116116

117117
boost::this_thread::interruption_point();
118118

@@ -135,7 +135,7 @@ void CDBEnv::MakeMock()
135135
DB_PRIVATE,
136136
S_IRUSR | S_IWUSR);
137137
if (ret > 0)
138-
throw runtime_error(strprintf("CDBEnv::MakeMock : Error %d opening database environment.", ret));
138+
throw runtime_error(strprintf("CDBEnv::MakeMock: Error %d opening database environment.", ret));
139139

140140
fDbEnvInit = true;
141141
fMockDb = true;
@@ -172,14 +172,14 @@ bool CDBEnv::Salvage(std::string strFile, bool fAggressive, std::vector<CDBEnv::
172172
Db db(&dbenv, 0);
173173
int result = db.verify(strFile.c_str(), NULL, &strDump, flags);
174174
if (result == DB_VERIFY_BAD) {
175-
LogPrintf("CDBEnv::Salvage : Database salvage found errors, all data may not be recoverable.\n");
175+
LogPrintf("CDBEnv::Salvage: Database salvage found errors, all data may not be recoverable.\n");
176176
if (!fAggressive) {
177-
LogPrintf("CDBEnv::Salvage : Rerun with aggressive mode to ignore errors and continue.\n");
177+
LogPrintf("CDBEnv::Salvage: Rerun with aggressive mode to ignore errors and continue.\n");
178178
return false;
179179
}
180180
}
181181
if (result != 0 && result != DB_VERIFY_BAD) {
182-
LogPrintf("CDBEnv::Salvage : Database salvage failed with result %d.\n", result);
182+
LogPrintf("CDBEnv::Salvage: Database salvage failed with result %d.\n", result);
183183
return false;
184184
}
185185

@@ -233,7 +233,7 @@ CDB::CDB(const std::string& strFilename, const char* pszMode, bool fFlushOnClose
233233
{
234234
LOCK(bitdb.cs_db);
235235
if (!bitdb.Open(GetDataDir()))
236-
throw runtime_error("CDB : Failed to open database environment.");
236+
throw runtime_error("CDB: Failed to open database environment.");
237237

238238
strFile = strFilename;
239239
++bitdb.mapFileUseCount[strFile];
@@ -246,7 +246,7 @@ CDB::CDB(const std::string& strFilename, const char* pszMode, bool fFlushOnClose
246246
DbMpoolFile* mpf = pdb->get_mpf();
247247
ret = mpf->set_flags(DB_MPOOL_NOFILE, 1);
248248
if (ret != 0)
249-
throw runtime_error(strprintf("CDB : Failed to configure for no temp file backing for database %s", strFile));
249+
throw runtime_error(strprintf("CDB: Failed to configure for no temp file backing for database %s", strFile));
250250
}
251251

252252
ret = pdb->open(NULL, // Txn pointer
@@ -261,7 +261,7 @@ CDB::CDB(const std::string& strFilename, const char* pszMode, bool fFlushOnClose
261261
pdb = NULL;
262262
--bitdb.mapFileUseCount[strFile];
263263
strFile = "";
264-
throw runtime_error(strprintf("CDB : Error %d, can't open database %s", ret, strFile));
264+
throw runtime_error(strprintf("CDB: Error %d, can't open database %s", ret, strFile));
265265
}
266266

267267
if (fCreate && !Exists(string("version"))) {
@@ -342,7 +342,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
342342
bitdb.mapFileUseCount.erase(strFile);
343343

344344
bool fSuccess = true;
345-
LogPrintf("CDB::Rewrite : Rewriting %s...\n", strFile);
345+
LogPrintf("CDB::Rewrite: Rewriting %s...\n", strFile);
346346
string strFileRes = strFile + ".rewrite";
347347
{ // surround usage of db with extra {}
348348
CDB db(strFile.c_str(), "r");
@@ -355,7 +355,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
355355
DB_CREATE, // Flags
356356
0);
357357
if (ret > 0) {
358-
LogPrintf("CDB::Rewrite : Can't create database file %s\n", strFileRes);
358+
LogPrintf("CDB::Rewrite: Can't create database file %s\n", strFileRes);
359359
fSuccess = false;
360360
}
361361

@@ -404,7 +404,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
404404
fSuccess = false;
405405
}
406406
if (!fSuccess)
407-
LogPrintf("CDB::Rewrite : Failed to rewrite database file %s\n", strFileRes);
407+
LogPrintf("CDB::Rewrite: Failed to rewrite database file %s\n", strFileRes);
408408
return fSuccess;
409409
}
410410
}
@@ -418,7 +418,7 @@ void CDBEnv::Flush(bool fShutdown)
418418
{
419419
int64_t nStart = GetTimeMillis();
420420
// Flush log data to the actual data file on all files that are not in use
421-
LogPrint("db", "CDBEnv::Flush : Flush(%s)%s\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " database not started");
421+
LogPrint("db", "CDBEnv::Flush: Flush(%s)%s\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " database not started");
422422
if (!fDbEnvInit)
423423
return;
424424
{
@@ -427,21 +427,21 @@ void CDBEnv::Flush(bool fShutdown)
427427
while (mi != mapFileUseCount.end()) {
428428
string strFile = (*mi).first;
429429
int nRefCount = (*mi).second;
430-
LogPrint("db", "CDBEnv::Flush : Flushing %s (refcount = %d)...\n", strFile, nRefCount);
430+
LogPrint("db", "CDBEnv::Flush: Flushing %s (refcount = %d)...\n", strFile, nRefCount);
431431
if (nRefCount == 0) {
432432
// Move log data to the dat file
433433
CloseDb(strFile);
434-
LogPrint("db", "CDBEnv::Flush : %s checkpoint\n", strFile);
434+
LogPrint("db", "CDBEnv::Flush: %s checkpoint\n", strFile);
435435
dbenv.txn_checkpoint(0, 0, 0);
436-
LogPrint("db", "CDBEnv::Flush : %s detach\n", strFile);
436+
LogPrint("db", "CDBEnv::Flush: %s detach\n", strFile);
437437
if (!fMockDb)
438438
dbenv.lsn_reset(strFile.c_str(), 0);
439-
LogPrint("db", "CDBEnv::Flush : %s closed\n", strFile);
439+
LogPrint("db", "CDBEnv::Flush: %s closed\n", strFile);
440440
mapFileUseCount.erase(mi++);
441441
} else
442442
mi++;
443443
}
444-
LogPrint("db", "CDBEnv::Flush : Flush(%s)%s took %15dms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " database not started", GetTimeMillis() - nStart);
444+
LogPrint("db", "CDBEnv::Flush: Flush(%s)%s took %15dms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " database not started", GetTimeMillis() - nStart);
445445
if (fShutdown) {
446446
char** listp;
447447
if (mapFileUseCount.empty()) {

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ bool AppInit2(boost::thread_group& threadGroup)
977977
} catch (const boost::filesystem::filesystem_error& e) {
978978
// Note: hardlink creation failing is not a disaster, it just means
979979
// blocks will get re-downloaded from peers.
980-
LogPrintf("Error hardlinking blk%04u.dat : %s\n", i, e.what());
980+
LogPrintf("Error hardlinking blk%04u.dat: %s\n", i, e.what());
981981
break;
982982
}
983983
}

src/keystore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ bool CBasicKeyStore::AddKeyPubKey(const CKey& key, const CPubKey &pubkey)
3636
bool CBasicKeyStore::AddCScript(const CScript& redeemScript)
3737
{
3838
if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE)
39-
return error("CBasicKeyStore::AddCScript() : redeemScripts > %i bytes are invalid", MAX_SCRIPT_ELEMENT_SIZE);
39+
return error("CBasicKeyStore::AddCScript(): redeemScripts > %i bytes are invalid", MAX_SCRIPT_ELEMENT_SIZE);
4040

4141
LOCK(cs_KeyStore);
4242
mapScripts[CScriptID(redeemScript)] = redeemScript;

0 commit comments

Comments
 (0)