diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-02-22 16:03:29 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-02-22 16:04:42 +0100 |
commit | aae64a21ba25ca86fe2bbb581681dc20d613fb44 (patch) | |
tree | ee4d90384abb7d859dba05c42bcd3af9477e5552 /src/leveldb/table/format.cc | |
parent | 4528f74fc202aa8ff152ff24f8319338fdaf3fd6 (diff) | |
parent | faa6dd27b1f1f96f5e1a26e830e1a80255afdb5f (diff) |
Merge #12451: Bump leveldb subtree
835a21b Squashed 'src/leveldb/' changes from c521b3ac65..64052c76c5 (MarcoFalke)
Pull request description:
Pull in changes from https://github.com/bitcoin/bitcoin/pull/11674#issuecomment-348174674.
Merges cleanly into master and 0.16 branch.
Tree-SHA512: 819c042c0dfac8dc3078fc182c1e22d4a85b343967475d3389be5b5b056361114d8c9892437cd1dc4b45808c27880c0e166e047afc2c2bd2bbc33e55336a8c33
Diffstat (limited to 'src/leveldb/table/format.cc')
-rw-r--r-- | src/leveldb/table/format.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/leveldb/table/format.cc b/src/leveldb/table/format.cc index 24e4e02445..285e1c0de3 100644 --- a/src/leveldb/table/format.cc +++ b/src/leveldb/table/format.cc @@ -82,7 +82,7 @@ Status ReadBlock(RandomAccessFile* file, } if (contents.size() != n + kBlockTrailerSize) { delete[] buf; - return Status::Corruption("truncated block read"); + return Status::Corruption("truncated block read", file->GetName()); } // Check the crc of the type and the block contents @@ -92,7 +92,7 @@ Status ReadBlock(RandomAccessFile* file, const uint32_t actual = crc32c::Value(data, n + 1); if (actual != crc) { delete[] buf; - s = Status::Corruption("block checksum mismatch"); + s = Status::Corruption("block checksum mismatch", file->GetName()); return s; } } @@ -119,13 +119,13 @@ Status ReadBlock(RandomAccessFile* file, size_t ulength = 0; if (!port::Snappy_GetUncompressedLength(data, n, &ulength)) { delete[] buf; - return Status::Corruption("corrupted compressed block contents"); + return Status::Corruption("corrupted compressed block contents", file->GetName()); } char* ubuf = new char[ulength]; if (!port::Snappy_Uncompress(data, n, ubuf)) { delete[] buf; delete[] ubuf; - return Status::Corruption("corrupted compressed block contents"); + return Status::Corruption("corrupted compressed block contents", file->GetName()); } delete[] buf; result->data = Slice(ubuf, ulength); @@ -135,7 +135,7 @@ Status ReadBlock(RandomAccessFile* file, } default: delete[] buf; - return Status::Corruption("bad block type"); + return Status::Corruption("bad block type", file->GetName()); } return Status::OK(); |