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

Method CommitInternal

src/index/base.cpp:211–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211bool 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
223bool BaseIndex::Rewind(const CBlockIndex* current_tip, const CBlockIndex* new_tip)
224{

Callers

nothing calls this directly

Calls 2

GetLocatorMethod · 0.80
WriteBestBlockMethod · 0.45

Tested by

no test coverage detected