MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Sync

Method Sync

src/coins.cpp:272–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272void CCoinsViewCache::Sync()
273{
274 auto cursor{CoinsViewCacheCursor(m_dirty_count, m_sentinel, cacheCoins, /*will_erase=*/false)};
275 base->BatchWrite(cursor, m_block_hash);
276 Assume(m_dirty_count == 0);
277 if (m_sentinel.second.Next() != &m_sentinel) {
278 /* BatchWrite must clear flags of all entries */
279 throw std::logic_error("Not all unspent flagged entries were cleared");
280 }
281}
282
283void CCoinsViewCache::Reset() noexcept
284{

Callers 1

FlushStateToDiskMethod · 0.45

Calls 3

BatchWriteMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected