| 160 | } |
| 161 | |
| 162 | void 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 | |
| 171 | bool BlockChain::add_block( |
| 172 | const PreparedBlock &pb, api::BlockHeader *info, bool just_mined, const std::string &source_address) { |
nothing calls this directly
no test coverage detected