From f5791c6ae3b59ef4c8d04e6873310a022e1211b6 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 26 Jan 2015 09:47:59 +0100 Subject: Add more information to errors in ReadBlockFromDisk A lot of times, disk corruption problems appear here. To facilitate debugging and troubleshooting, add position information to the error messages. --- src/chain.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/chain.h') diff --git a/src/chain.h b/src/chain.h index 004e87ab52..02f53cd2f2 100644 --- a/src/chain.h +++ b/src/chain.h @@ -48,6 +48,12 @@ struct CDiskBlockPos void SetNull() { nFile = -1; nPos = 0; } bool IsNull() const { return (nFile == -1); } + + std::string ToString() const + { + return strprintf("CBlockDiskPos(nFile=%i, nPos=%i)", nFile, nPos); + } + }; enum BlockStatus { -- cgit v1.2.3