diff options
| author | Stefan Boberg <[email protected]> | 2023-06-30 12:07:36 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2023-06-30 12:07:36 +0200 |
| commit | 080c9f8b25cb0e65616286524de2f2aca6f1a77d (patch) | |
| tree | 711c10114111caed0d7604a93a0e254034534d40 /src/zenstore/blockstore.cpp | |
| parent | clang-format :( (diff) | |
| download | zen-080c9f8b25cb0e65616286524de2f2aca6f1a77d.tar.xz zen-080c9f8b25cb0e65616286524de2f2aca6f1a77d.zip | |
CidStore now implements the ChunkResolver interface
this allows client code to use the ChunkResolver interface instead of
CidStore, which can help with testing scenarios
Diffstat (limited to 'src/zenstore/blockstore.cpp')
| -rw-r--r-- | src/zenstore/blockstore.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/zenstore/blockstore.cpp b/src/zenstore/blockstore.cpp index e0876070b..997774ebe 100644 --- a/src/zenstore/blockstore.cpp +++ b/src/zenstore/blockstore.cpp @@ -80,10 +80,6 @@ BlockStoreFile::MarkAsDeleteOnClose() IoBuffer BlockStoreFile::GetChunk(uint64_t Offset, uint64_t Size) { - if ((Offset + Size) > m_IoBuffer.GetSize()) - { - return IoBuffer(); - } return IoBuffer(m_IoBuffer, Offset, Size); } @@ -119,6 +115,14 @@ BlockStoreFile::StreamByteRange(uint64_t FileOffset, uint64_t Size, std::functio constexpr uint64_t ScrubSmallChunkWindowSize = 4 * 1024 * 1024; +BlockStore::BlockStore() +{ +} + +BlockStore::~BlockStore() +{ +} + std::unordered_map<uint32_t, uint64_t> BlockStore::Initialize(const std::filesystem::path& BlocksBasePath, uint64_t MaxBlockSize, uint64_t MaxBlockCount) { |