diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2021-12-08 08:01:46 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2022-01-06 22:14:16 -0500 |
commit | e5b6aef61221b621ad77b5f075a16897e08835bf (patch) | |
tree | 806d75501035fd224de6e3b17a7f9fa3bab3dd8d /src/chain.cpp | |
parent | f7086fd8ff084ab0dd656d75b7485e59263bdfd8 (diff) |
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
Diffstat (limited to 'src/chain.cpp')
-rw-r--r-- | src/chain.cpp | 6 |
1 files changed, 6 insertions, 0 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 <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) { |