mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-27 22:00:49 +02:00
Move CBlockFileInfo::ToString method where class is declared
CBlockFileInfo class is declared in src/chain.h, so move ToString definition to src/chain.cpp instead of src/node/blockstorage.cpp
This commit is contained in:
@@ -4,6 +4,12 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <chain.h>
|
||||
#include <util/time.h>
|
||||
|
||||
std::string CBlockFileInfo::ToString() const
|
||||
{
|
||||
return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, FormatISO8601Date(nTimeFirst), FormatISO8601Date(nTimeLast));
|
||||
}
|
||||
|
||||
void CChain::SetTip(CBlockIndex *pindex) {
|
||||
if (pindex == nullptr) {
|
||||
|
@@ -473,14 +473,7 @@ void CleanupBlockRevFiles()
|
||||
remove(item.second);
|
||||
}
|
||||
}
|
||||
} // namespace node
|
||||
|
||||
std::string CBlockFileInfo::ToString() const
|
||||
{
|
||||
return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, FormatISO8601Date(nTimeFirst), FormatISO8601Date(nTimeLast));
|
||||
}
|
||||
|
||||
namespace node {
|
||||
CBlockFileInfo* BlockManager::GetBlockFileInfo(size_t n)
|
||||
{
|
||||
LOCK(cs_LastBlockFile);
|
||||
|
Reference in New Issue
Block a user