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
pull/826/head
Russell Yanofsky 3 years ago
parent f7086fd8ff
commit e5b6aef612

@ -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);

Loading…
Cancel
Save