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:
1 parent
f7086fd8ff
commit
e5b6aef612
2 files changed
+6
-7
No files matched your search
@@ -4,6 +4,12 @@
|
|||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <chain.h>
|
#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) {
|
void CChain::SetTip(CBlockIndex *pindex) {
|
||||||
if (pindex == nullptr) {
|
if (pindex == nullptr) {
|
||||||
|
|||||||
@@ -473,14 +473,7 @@ void CleanupBlockRevFiles()
|
|||||||
remove(item.second);
|
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)
|
CBlockFileInfo* BlockManager::GetBlockFileInfo(size_t n)
|
||||||
{
|
{
|
||||||
LOCK(cs_LastBlockFile);
|
LOCK(cs_LastBlockFile);
|
||||||
|
|||||||
Reference in new issue
Block a user