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.
This commit is contained in:
Wladimir J. van der Laan
2015-01-26 09:47:59 +01:00
parent 1c4e3f99f0
commit f5791c6ae3
2 changed files with 11 additions and 4 deletions

View File

@@ -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 {