| 209 | } |
| 210 | |
| 211 | bool BaseIndex::CommitInternal(CDBBatch& batch) |
| 212 | { |
| 213 | LOCK(cs_main); |
| 214 | // Don't commit anything if we haven't indexed any block yet |
| 215 | // (this could happen if init is interrupted). |
| 216 | if (m_best_block_index == nullptr) { |
| 217 | return false; |
| 218 | } |
| 219 | GetDB().WriteBestBlock(batch, m_chainstate->m_chain.GetLocator(m_best_block_index)); |
| 220 | return true; |
| 221 | } |
| 222 | |
| 223 | bool BaseIndex::Rewind(const CBlockIndex* current_tip, const CBlockIndex* new_tip) |
| 224 | { |
nothing calls this directly
no test coverage detected