Browse Source

Deserialized cnHeader in txdb.

cn_mining
Jianping Wu 5 years ago
parent
commit
c5fc61ba4b
  1. 1
      src/txdb.cpp
  2. 6
      src/validation.cpp

1
src/txdb.cpp

@ -380,6 +380,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams, @@ -380,6 +380,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams,
pindexNew->nNonce = diskindex.nNonce;
pindexNew->nStatus = diskindex.nStatus;
pindexNew->nTx = diskindex.nTx;
pindexNew->cnHeader = diskindex.cnHeader;
// Kevacoin: Disable PoW Sanity check while loading block index from disk.
// We use the sha256 hash for the block index for performance reasons, which is recorded for later use.

6
src/validation.cpp

@ -2294,12 +2294,6 @@ bool CChainState::DisconnectTip(CValidationState& state, const CChainParams& cha @@ -2294,12 +2294,6 @@ bool CChainState::DisconnectTip(CValidationState& state, const CChainParams& cha
if (!FlushStateToDisk(chainparams, state, FLUSH_STATE_IF_NEEDED))
return false;
#if 0
// We don't need this because names never expire.
AssertLockHeld(cs_main);
CNameConflictTracker nameConflicts(mempool);
#endif
if (disconnectpool) {
// Save transactions to re-add to mempool at end of reorg
for (auto it = block.vtx.rbegin(); it != block.vtx.rend(); ++it) {

Loading…
Cancel
Save