diff options
Diffstat (limited to 'src/chain.cpp')
-rw-r--r-- | src/chain.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/chain.cpp b/src/chain.cpp index 5d182e1af8..b8158f7b0b 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) { @@ -145,7 +151,7 @@ int64_t GetBlockProofEquivalentTime(const CBlockIndex& to, const CBlockIndex& fr if (r.bits() > 63) { return sign * std::numeric_limits<int64_t>::max(); } - return sign * r.GetLow64(); + return sign * int64_t(r.GetLow64()); } /** Find the last common ancestor two blocks have. |