MCPcopy Create free account
hub / github.com/ElementsProject/elements / InitCoinsDB

Method InitCoinsDB

src/validation.cpp:1548–1560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1546 m_from_snapshot_blockhash(from_snapshot_blockhash) {}
1547
1548void CChainState::InitCoinsDB(
1549 size_t cache_size_bytes,
1550 bool in_memory,
1551 bool should_wipe,
1552 std::string leveldb_name)
1553{
1554 if (m_from_snapshot_blockhash) {
1555 leveldb_name += "_" + m_from_snapshot_blockhash->ToString();
1556 }
1557
1558 m_coins_views = std::make_unique<CoinsViews>(
1559 leveldb_name, cache_size_bytes, in_memory, should_wipe);
1560}
1561
1562void CChainState::InitCoinsCache(size_t cache_size_bytes)
1563{

Callers 5

ActivateSnapshotMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
LoadChainstateFunction · 0.80

Calls 1

ToStringMethod · 0.45

Tested by 3

BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64