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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user