Skip to content

Commit a4e96ca

Browse files
committed
Merge bitcoin/bitcoin#33042: refactor: inline constant return values from dbwrapper write methods
743abbc refactor: inline constant return value of `BlockTreeDB::WriteBatchSync` and `BlockManager::WriteBlockIndexDB` and `BlockTreeDB::WriteFlag` (Lőrinc) e030240 refactor: inline constant return value of `CDBWrapper::Erase` and `BlockTreeDB::WriteReindexing` (Lőrinc) cdab948 refactor: inline constant return value of `CDBWrapper::Write` (Lőrinc) d1847cf refactor: inline constant return value of `TxIndex::DB::WriteTxs` (Lőrinc) 50b63a5 refactor: inline constant return value of `CDBWrapper::WriteBatch` (Lőrinc) Pull request description: Related to bitcoin/bitcoin#31144 (comment) ### Summary `WriteBatch` always returns `true` - the errors are handled by throwing `dbwrapper_error` instead. ### Context This boolean return value of the `Write` methods is confusing because it's inconsistent with `CDBWrapper::Read`, which catches exceptions and returns a boolean to indicate success/failure. It's bad that `Read` returns and `Write` throws - but it's a lot worse that `Write` advertises a return value when it actually communicates errors through exceptions. ### Solution This PR removes the constant return values from write methods and inlines `true` at their call sites. Many upstream methods had boolean return values only because they were propagating these constants - those have been cleaned up as well. Methods that returned a constant `true` value that now return `void`: - `CDBWrapper::WriteBatch`, `CDBWrapper::Write`, `CDBWrapper::Erase` - `TxIndex::DB::WriteTxs` - `BlockTreeDB::WriteReindexing`, `BlockTreeDB::WriteBatchSync`, `BlockTreeDB::WriteFlag` - `BlockManager::WriteBlockIndexDB` ### Note `CCoinsView::BatchWrite` (and transitively `CCoinsViewCache::Flush` & `CCoinsViewCache::Sync`) were intentionally not changed here. While all implementations return `true`, the base `CCoinsView::BatchWrite` returns `false`. Changing this would cause `coins_view` tests to fail with: > terminating due to uncaught exception of type std::logic_error: Not all unspent flagged entries were cleared We can fix that in a follow-up PR. ACKs for top commit: achow101: ACK 743abbc janb84: ACK 743abbc TheCharlatan: ACK 743abbc sipa: ACK 743abbc Tree-SHA512: b2a550bff066216f1958d2dd9a7ef6a9949de518cc636f8ab9c670e0b7a330c1eb8c838e458a8629acb8ac980cea6616955cd84436a7b8ab9096f6d648073b1e
2 parents 8c2710b + 743abbc commit a4e96ca

File tree

12 files changed

+53
-59
lines changed

12 files changed

+53
-59
lines changed

src/dbwrapper.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ CDBWrapper::~CDBWrapper()
274274
DBContext().options.env = nullptr;
275275
}
276276

277-
bool CDBWrapper::WriteBatch(CDBBatch& batch, bool fSync)
277+
void CDBWrapper::WriteBatch(CDBBatch& batch, bool fSync)
278278
{
279279
const bool log_memory = LogAcceptCategory(BCLog::LEVELDB, BCLog::Level::Debug);
280280
double mem_before = 0;
@@ -288,7 +288,6 @@ bool CDBWrapper::WriteBatch(CDBBatch& batch, bool fSync)
288288
LogDebug(BCLog::LEVELDB, "WriteBatch memory usage: db=%s, before=%.1fMiB, after=%.1fMiB\n",
289289
m_name, mem_before, mem_after);
290290
}
291-
return true;
292291
}
293292

294293
size_t CDBWrapper::DynamicMemoryUsage() const

src/dbwrapper.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ class CDBWrapper
230230
}
231231

232232
template <typename K, typename V>
233-
bool Write(const K& key, const V& value, bool fSync = false)
233+
void Write(const K& key, const V& value, bool fSync = false)
234234
{
235235
CDBBatch batch(*this);
236236
batch.Write(key, value);
237-
return WriteBatch(batch, fSync);
237+
WriteBatch(batch, fSync);
238238
}
239239

240240
//! @returns filesystem path to the on-disk data.
@@ -255,14 +255,14 @@ class CDBWrapper
255255
}
256256

257257
template <typename K>
258-
bool Erase(const K& key, bool fSync = false)
258+
void Erase(const K& key, bool fSync = false)
259259
{
260260
CDBBatch batch(*this);
261261
batch.Erase(key);
262-
return WriteBatch(batch, fSync);
262+
WriteBatch(batch, fSync);
263263
}
264264

265-
bool WriteBatch(CDBBatch& batch, bool fSync = false);
265+
void WriteBatch(CDBBatch& batch, bool fSync = false);
266266

267267
// Get an estimate of LevelDB memory usage (in bytes).
268268
size_t DynamicMemoryUsage() const;

src/index/base.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ bool BaseIndex::Commit()
275275
ok = CustomCommit(batch);
276276
if (ok) {
277277
GetDB().WriteBestBlock(batch, GetLocator(*m_chain, m_best_block_index.load()->GetBlockHash()));
278-
ok = GetDB().WriteBatch(batch);
278+
GetDB().WriteBatch(batch);
279279
}
280280
}
281281
if (!ok) {

src/index/blockfilterindex.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,7 @@ bool BlockFilterIndex::Write(const BlockFilter& filter, uint32_t block_height, c
311311
value.second.header = filter_header;
312312
value.second.pos = m_next_filter_pos;
313313

314-
if (!m_db->Write(DBHeightKey(block_height), value)) {
315-
return false;
316-
}
314+
m_db->Write(DBHeightKey(block_height), value);
317315

318316
m_next_filter_pos.nPos += bytes_written;
319317
return true;
@@ -358,7 +356,7 @@ bool BlockFilterIndex::CustomRemove(const interfaces::BlockInfo& block)
358356
// But since this creates new references to the filter, the position should get updated here
359357
// atomically as well in case Commit fails.
360358
batch.Write(DB_FILTER_POS, m_next_filter_pos);
361-
if (!m_db->WriteBatch(batch)) return false;
359+
m_db->WriteBatch(batch);
362360

363361
// Update cached header to the previous block hash
364362
m_last_header = *Assert(ReadFilterHeader(block.height - 1, *Assert(block.prev_hash)));

src/index/coinstatsindex.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ bool CoinStatsIndex::CustomAppend(const interfaces::BlockInfo& block)
253253

254254
// Intentionally do not update DB_MUHASH here so it stays in sync with
255255
// DB_BEST_BLOCK, and the index is not corrupted if there is an unclean shutdown.
256-
return m_db->Write(DBHeightKey(block.height), value);
256+
m_db->Write(DBHeightKey(block.height), value);
257+
return true;
257258
}
258259

259260
[[nodiscard]] static bool CopyHeightIndexToHashIndex(CDBIterator& db_it, CDBBatch& batch,
@@ -290,7 +291,7 @@ bool CoinStatsIndex::CustomRemove(const interfaces::BlockInfo& block)
290291
return false;
291292
}
292293

293-
if (!m_db->WriteBatch(batch)) return false;
294+
m_db->WriteBatch(batch);
294295

295296
if (!RevertBlock(block)) {
296297
return false; // failure cause logged internally

src/index/txindex.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class TxIndex::DB : public BaseIndex::DB
4646
bool ReadTxPos(const Txid& txid, CDiskTxPos& pos) const;
4747

4848
/// Write a batch of transaction positions to the DB.
49-
[[nodiscard]] bool WriteTxs(const std::vector<std::pair<Txid, CDiskTxPos>>& v_pos);
49+
void WriteTxs(const std::vector<std::pair<Txid, CDiskTxPos>>& v_pos);
5050
};
5151

5252
TxIndex::DB::DB(size_t n_cache_size, bool f_memory, bool f_wipe) :
@@ -58,13 +58,13 @@ bool TxIndex::DB::ReadTxPos(const Txid& txid, CDiskTxPos& pos) const
5858
return Read(std::make_pair(DB_TXINDEX, txid.ToUint256()), pos);
5959
}
6060

61-
bool TxIndex::DB::WriteTxs(const std::vector<std::pair<Txid, CDiskTxPos>>& v_pos)
61+
void TxIndex::DB::WriteTxs(const std::vector<std::pair<Txid, CDiskTxPos>>& v_pos)
6262
{
6363
CDBBatch batch(*this);
6464
for (const auto& [txid, pos] : v_pos) {
6565
batch.Write(std::make_pair(DB_TXINDEX, txid.ToUint256()), pos);
6666
}
67-
return WriteBatch(batch);
67+
WriteBatch(batch);
6868
}
6969

7070
TxIndex::TxIndex(std::unique_ptr<interfaces::Chain> chain, size_t n_cache_size, bool f_memory, bool f_wipe)
@@ -86,7 +86,8 @@ bool TxIndex::CustomAppend(const interfaces::BlockInfo& block)
8686
vPos.emplace_back(tx->GetHash(), pos);
8787
pos.nTxOffset += ::GetSerializeSize(TX_WITH_WITNESS(*tx));
8888
}
89-
return m_db->WriteTxs(vPos);
89+
m_db->WriteTxs(vPos);
90+
return true;
9091
}
9192

9293
BaseIndex::DB& TxIndex::GetDB() const { return *m_db; }

src/node/blockstorage.cpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ bool BlockTreeDB::ReadBlockFileInfo(int nFile, CBlockFileInfo& info)
5959
return Read(std::make_pair(DB_BLOCK_FILES, nFile), info);
6060
}
6161

62-
bool BlockTreeDB::WriteReindexing(bool fReindexing)
62+
void BlockTreeDB::WriteReindexing(bool fReindexing)
6363
{
6464
if (fReindexing) {
65-
return Write(DB_REINDEX_FLAG, uint8_t{'1'});
65+
Write(DB_REINDEX_FLAG, uint8_t{'1'});
6666
} else {
67-
return Erase(DB_REINDEX_FLAG);
67+
Erase(DB_REINDEX_FLAG);
6868
}
6969
}
7070

@@ -78,7 +78,7 @@ bool BlockTreeDB::ReadLastBlockFile(int& nFile)
7878
return Read(DB_LAST_BLOCK, nFile);
7979
}
8080

81-
bool BlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*>>& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo)
81+
void BlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*>>& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo)
8282
{
8383
CDBBatch batch(*this);
8484
for (const auto& [file, info] : fileInfo) {
@@ -88,12 +88,12 @@ bool BlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockFi
8888
for (const CBlockIndex* bi : blockinfo) {
8989
batch.Write(std::make_pair(DB_BLOCK_INDEX, bi->GetBlockHash()), CDiskBlockIndex{bi});
9090
}
91-
return WriteBatch(batch, true);
91+
WriteBatch(batch, true);
9292
}
9393

94-
bool BlockTreeDB::WriteFlag(const std::string& name, bool fValue)
94+
void BlockTreeDB::WriteFlag(const std::string& name, bool fValue)
9595
{
96-
return Write(std::make_pair(DB_FLAG, name), fValue ? uint8_t{'1'} : uint8_t{'0'});
96+
Write(std::make_pair(DB_FLAG, name), fValue ? uint8_t{'1'} : uint8_t{'0'});
9797
}
9898

9999
bool BlockTreeDB::ReadFlag(const std::string& name, bool& fValue)
@@ -477,7 +477,7 @@ bool BlockManager::LoadBlockIndex(const std::optional<uint256>& snapshot_blockha
477477
return true;
478478
}
479479

480-
bool BlockManager::WriteBlockIndexDB()
480+
void BlockManager::WriteBlockIndexDB()
481481
{
482482
AssertLockHeld(::cs_main);
483483
std::vector<std::pair<int, const CBlockFileInfo*>> vFiles;
@@ -493,10 +493,7 @@ bool BlockManager::WriteBlockIndexDB()
493493
m_dirty_blockindex.erase(it++);
494494
}
495495
int max_blockfile = WITH_LOCK(cs_LastBlockFile, return this->MaxBlockfileNum());
496-
if (!m_block_tree_db->WriteBatchSync(vFiles, max_blockfile, vBlocks)) {
497-
return false;
498-
}
499-
return true;
496+
m_block_tree_db->WriteBatchSync(vFiles, max_blockfile, vBlocks);
500497
}
501498

502499
bool BlockManager::LoadBlockIndexDB(const std::optional<uint256>& snapshot_blockhash)

src/node/blockstorage.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ class BlockTreeDB : public CDBWrapper
5252
{
5353
public:
5454
using CDBWrapper::CDBWrapper;
55-
bool WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*>>& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo);
55+
void WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*>>& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo);
5656
bool ReadBlockFileInfo(int nFile, CBlockFileInfo& info);
5757
bool ReadLastBlockFile(int& nFile);
58-
bool WriteReindexing(bool fReindexing);
58+
void WriteReindexing(bool fReindexing);
5959
void ReadReindexing(bool& fReindexing);
60-
bool WriteFlag(const std::string& name, bool fValue);
60+
void WriteFlag(const std::string& name, bool fValue);
6161
bool ReadFlag(const std::string& name, bool& fValue);
6262
bool LoadBlockIndexGuts(const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex, const util::SignalInterrupt& interrupt)
6363
EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
@@ -300,7 +300,7 @@ class BlockManager
300300

301301
std::unique_ptr<BlockTreeDB> m_block_tree_db GUARDED_BY(::cs_main);
302302

303-
bool WriteBlockIndexDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
303+
void WriteBlockIndexDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
304304
bool LoadBlockIndexDB(const std::optional<uint256>& snapshot_blockhash)
305305
EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
306306

src/test/dbwrapper_tests.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper)
3939
for (uint8_t k{0}; k < 10; ++k) {
4040
uint8_t key{k};
4141
uint256 value{m_rng.rand256()};
42-
BOOST_CHECK(dbw.Write(key, value));
42+
dbw.Write(key, value);
4343
key_values.emplace_back(key, value);
4444
}
4545
}
@@ -86,52 +86,52 @@ BOOST_AUTO_TEST_CASE(dbwrapper_basic_data)
8686
std::string key_block = "b" + m_rng.rand256().ToString();
8787

8888
uint256 in_block = m_rng.rand256();
89-
BOOST_CHECK(dbw.Write(key_block, in_block));
89+
dbw.Write(key_block, in_block);
9090
BOOST_CHECK(dbw.Read(key_block, res));
9191
BOOST_CHECK_EQUAL(res.ToString(), in_block.ToString());
9292

9393
//Simulate file raw data - "f + file_number"
9494
std::string key_file = strprintf("f%04x", m_rng.rand32());
9595

9696
uint256 in_file_info = m_rng.rand256();
97-
BOOST_CHECK(dbw.Write(key_file, in_file_info));
97+
dbw.Write(key_file, in_file_info);
9898
BOOST_CHECK(dbw.Read(key_file, res));
9999
BOOST_CHECK_EQUAL(res.ToString(), in_file_info.ToString());
100100

101101
//Simulate transaction raw data - "t + transaction hash"
102102
std::string key_transaction = "t" + m_rng.rand256().ToString();
103103

104104
uint256 in_transaction = m_rng.rand256();
105-
BOOST_CHECK(dbw.Write(key_transaction, in_transaction));
105+
dbw.Write(key_transaction, in_transaction);
106106
BOOST_CHECK(dbw.Read(key_transaction, res));
107107
BOOST_CHECK_EQUAL(res.ToString(), in_transaction.ToString());
108108

109109
//Simulate UTXO raw data - "c + transaction hash"
110110
std::string key_utxo = "c" + m_rng.rand256().ToString();
111111

112112
uint256 in_utxo = m_rng.rand256();
113-
BOOST_CHECK(dbw.Write(key_utxo, in_utxo));
113+
dbw.Write(key_utxo, in_utxo);
114114
BOOST_CHECK(dbw.Read(key_utxo, res));
115115
BOOST_CHECK_EQUAL(res.ToString(), in_utxo.ToString());
116116

117117
//Simulate last block file number - "l"
118118
uint8_t key_last_blockfile_number{'l'};
119119
uint32_t lastblockfilenumber = m_rng.rand32();
120-
BOOST_CHECK(dbw.Write(key_last_blockfile_number, lastblockfilenumber));
120+
dbw.Write(key_last_blockfile_number, lastblockfilenumber);
121121
BOOST_CHECK(dbw.Read(key_last_blockfile_number, res_uint_32));
122122
BOOST_CHECK_EQUAL(lastblockfilenumber, res_uint_32);
123123

124124
//Simulate Is Reindexing - "R"
125125
uint8_t key_IsReindexing{'R'};
126126
bool isInReindexing = m_rng.randbool();
127-
BOOST_CHECK(dbw.Write(key_IsReindexing, isInReindexing));
127+
dbw.Write(key_IsReindexing, isInReindexing);
128128
BOOST_CHECK(dbw.Read(key_IsReindexing, res_bool));
129129
BOOST_CHECK_EQUAL(isInReindexing, res_bool);
130130

131131
//Simulate last block hash up to which UXTO covers - 'B'
132132
uint8_t key_lastblockhash_uxto{'B'};
133133
uint256 lastblock_hash = m_rng.rand256();
134-
BOOST_CHECK(dbw.Write(key_lastblockhash_uxto, lastblock_hash));
134+
dbw.Write(key_lastblockhash_uxto, lastblock_hash);
135135
BOOST_CHECK(dbw.Read(key_lastblockhash_uxto, res));
136136
BOOST_CHECK_EQUAL(lastblock_hash, res);
137137

@@ -142,7 +142,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_basic_data)
142142
std::string key_file_option = strprintf("%s%01x%s", file_option_tag, filename_length, filename);
143143

144144
bool in_file_bool = m_rng.randbool();
145-
BOOST_CHECK(dbw.Write(key_file_option, in_file_bool));
145+
dbw.Write(key_file_option, in_file_bool);
146146
BOOST_CHECK(dbw.Read(key_file_option, res_bool));
147147
BOOST_CHECK_EQUAL(res_bool, in_file_bool);
148148
}
@@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_batch)
173173
// Remove key3 before it's even been written
174174
batch.Erase(key3);
175175

176-
BOOST_CHECK(dbw.WriteBatch(batch));
176+
dbw.WriteBatch(batch);
177177

178178
BOOST_CHECK(dbw.Read(key, res));
179179
BOOST_CHECK_EQUAL(res.ToString(), in.ToString());
@@ -195,10 +195,10 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
195195
// The two keys are intentionally chosen for ordering
196196
uint8_t key{'j'};
197197
uint256 in = m_rng.rand256();
198-
BOOST_CHECK(dbw.Write(key, in));
198+
dbw.Write(key, in);
199199
uint8_t key2{'k'};
200200
uint256 in2 = m_rng.rand256();
201-
BOOST_CHECK(dbw.Write(key2, in2));
201+
dbw.Write(key2, in2);
202202

203203
std::unique_ptr<CDBIterator> it(const_cast<CDBWrapper&>(dbw).NewIterator());
204204

@@ -238,7 +238,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
238238
uint256 in = m_rng.rand256();
239239
uint256 res;
240240

241-
BOOST_CHECK(dbw->Write(key, in));
241+
dbw->Write(key, in);
242242
BOOST_CHECK(dbw->Read(key, res));
243243
BOOST_CHECK_EQUAL(res.ToString(), in.ToString());
244244

@@ -261,7 +261,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
261261
uint256 res3;
262262

263263
// Check that we can write successfully
264-
BOOST_CHECK(odbw.Write(key, in2));
264+
odbw.Write(key, in2);
265265
BOOST_CHECK(odbw.Read(key, res3));
266266
BOOST_CHECK_EQUAL(res3.ToString(), in2.ToString());
267267
}
@@ -279,7 +279,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
279279
uint256 in = m_rng.rand256();
280280
uint256 res;
281281

282-
BOOST_CHECK(dbw->Write(key, in));
282+
dbw->Write(key, in);
283283
BOOST_CHECK(dbw->Read(key, res));
284284
BOOST_CHECK_EQUAL(res.ToString(), in.ToString());
285285

@@ -298,7 +298,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
298298
uint256 res3;
299299

300300
// Check that we can write successfully
301-
BOOST_CHECK(odbw.Write(key, in2));
301+
odbw.Write(key, in2);
302302
BOOST_CHECK(odbw.Read(key, res3));
303303
BOOST_CHECK_EQUAL(res3.ToString(), in2.ToString());
304304
}
@@ -310,7 +310,7 @@ BOOST_AUTO_TEST_CASE(iterator_ordering)
310310
for (int x=0x00; x<256; ++x) {
311311
uint8_t key = x;
312312
uint32_t value = x*x;
313-
if (!(x & 1)) BOOST_CHECK(dbw.Write(key, value));
313+
if (!(x & 1)) dbw.Write(key, value);
314314
}
315315

316316
// Check that creating an iterator creates a snapshot
@@ -319,7 +319,7 @@ BOOST_AUTO_TEST_CASE(iterator_ordering)
319319
for (unsigned int x=0x00; x<256; ++x) {
320320
uint8_t key = x;
321321
uint32_t value = x*x;
322-
if (x & 1) BOOST_CHECK(dbw.Write(key, value));
322+
if (x & 1) dbw.Write(key, value);
323323
}
324324

325325
for (const int seek_start : {0x00, 0x80}) {
@@ -381,7 +381,7 @@ BOOST_AUTO_TEST_CASE(iterator_string_ordering)
381381
for (int z = 0; z < y; ++z)
382382
key += key;
383383
uint32_t value = x*x;
384-
BOOST_CHECK(dbw.Write(StringContentsSerializer{key}, value));
384+
dbw.Write(StringContentsSerializer{key}, value);
385385
}
386386
}
387387

src/test/fuzz/block_index.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ FUZZ_TARGET(block_index, .init = init_block_index)
8989
}
9090

9191
// Store these files and blocks in the block index. It should not fail.
92-
assert(block_index.WriteBatchSync(files_info, files_count - 1, blocks_info));
92+
block_index.WriteBatchSync(files_info, files_count - 1, blocks_info);
9393

9494
// We should be able to read every block file info we stored. Its value should correspond to
9595
// what we stored above.

0 commit comments

Comments
 (0)