MCPcopy Create free account
hub / github.com/bcndev/bytecoin / db_commit

Method db_commit

src/Core/BlockChain.cpp:162–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void BlockChain::db_commit() {
163 m_log(logging::INFO) << "BlockChain::db_commit started... tip_height=" << m_tip_height
164 << " m_header_cache.size=" << m_header_cache.size();
165 m_db.commit_db_txn();
166 m_header_cache.clear(); // Most simple cache policy ever
167 m_archive.db_commit();
168 m_log(logging::INFO) << "BlockChain::db_commit finished...";
169}
170
171bool BlockChain::add_block(
172 const PreparedBlock &pb, api::BlockHeader *info, bool just_mined, const std::string &source_address) {

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
commit_db_txnMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected