mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
Remove some unnecessary c_strs() in logging and the GUI
Includes `core: remove unneeded c_str() / Qt: replace c_str() with Qt code` by P. Kaufmann.
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
f7d0a86bf6
commit
2c2cc5dac1
@@ -4392,7 +4392,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
if (!pto->fDisconnect && state.nBlocksInFlight &&
|
||||
state.nLastBlockReceive < state.nLastBlockProcess - BLOCK_DOWNLOAD_TIMEOUT*1000000 &&
|
||||
state.vBlocksInFlight.front().nTime < state.nLastBlockProcess - 2*BLOCK_DOWNLOAD_TIMEOUT*1000000) {
|
||||
LogPrintf("Peer %s is stalling block download, disconnecting\n", state.name.c_str());
|
||||
LogPrintf("Peer %s is stalling block download, disconnecting\n", state.name);
|
||||
pto->fDisconnect = true;
|
||||
}
|
||||
|
||||
@@ -4502,7 +4502,7 @@ bool CBlockUndo::ReadFromDisk(const CDiskBlockPos &pos, const uint256 &hashBlock
|
||||
}
|
||||
|
||||
std::string CBlockFileInfo::ToString() const {
|
||||
return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat("%Y-%m-%d", nTimeFirst).c_str(), DateTimeStrFormat("%Y-%m-%d", nTimeLast).c_str());
|
||||
return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat("%Y-%m-%d", nTimeFirst), DateTimeStrFormat("%Y-%m-%d", nTimeLast));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user