diff --git a/src/chain.cpp b/src/chain.cpp index 5d182e1af8..e0c29372dd 100644 --- a/src/chain.cpp +++ b/src/chain.cpp @@ -4,6 +4,12 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include +#include + +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) { diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index ce8300f504..808e7a93a5 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -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);