diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-01-26 09:47:59 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-02-05 14:21:25 +0100 |
| commit | f5791c6ae3b59ef4c8d04e6873310a022e1211b6 (patch) | |
| tree | b4c259437b6104c1efd4db667fd5c13dfac08976 /src/chain.h | |
| parent | Merge pull request #5754 (diff) | |
| download | discoin-f5791c6ae3b59ef4c8d04e6873310a022e1211b6.tar.xz discoin-f5791c6ae3b59ef4c8d04e6873310a022e1211b6.zip | |
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.
Diffstat (limited to 'src/chain.h')
| -rw-r--r-- | src/chain.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/chain.h b/src/chain.h index 004e87ab5..02f53cd2f 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 { |