From e5b6aef61221b621ad77b5f075a16897e08835bf Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Wed, 8 Dec 2021 08:01:46 -0500 Subject: 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 --- src/chain.cpp | 6 ++++++ src/node/blockstorage.cpp | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-) 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); -- cgit v1.2.3