Browse Source

checks

v1.0.12-bitcore
Larry 7 years ago
parent
commit
01c90c644b
  1. 13
      src/main.cpp

13
src/main.cpp

@ -2965,6 +2965,7 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
pnode->PushInventory(CInv(MSG_BLOCK, hashNewTip));
}
// Notify external listeners about the new tip.
GetMainSignals().UpdatedBlockTip(hashNewTip);
GetMainSignals().UpdatedBlockTip(pindexNewTip);
uiInterface.NotifyBlockTip(hashNewTip);
}
@ -3831,6 +3832,18 @@ bool static LoadBlockIndexDB()
}
}
// Check whether we have an address index
pblocktree->ReadFlag("addressindex", fAddressIndex);
LogPrintf("%s: address index %s\n", __func__, fAddressIndex ? "enabled" : "disabled");
// Check whether we have a timestamp index
pblocktree->ReadFlag("timestampindex", fTimestampIndex);
LogPrintf("%s: timestamp index %s\n", __func__, fTimestampIndex ? "enabled" : "disabled");
// Check whether we have a spent index
pblocktree->ReadFlag("spentindex", fSpentIndex);
LogPrintf("%s: spent index %s\n", __func__, fSpentIndex ? "enabled" : "disabled");
// Load pointer to end of best chain
BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
if (it == mapBlockIndex.end())

Loading…
Cancel
Save