From 35ed1cfce1cf679ed051fa2ab8d00f8878fec576 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Fri, 24 Jul 2015 19:56:03 +0000 Subject: Add Scrypt hash and AuxPoW header to index database Add Scrypt hash and AuxPoW header to index database so that index can be validated (a check that both Litecoin and Namecoin disable for simplicity). The index format is incompatible with 1.8, as a result, however, and guidelines on performing the upgrade will need to be prepared. Given scope of the change, it may be advisable for services to prepare bootstrap files and destroy existing index databases entirely before reindexing. To discuss. --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index dfcd50310..80d301d54 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2531,6 +2531,11 @@ CBlockIndex* AddToBlockIndex(const CBlockHeader& block) pindexNew->BuildSkip(); } pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + GetBlockProof(*pindexNew); + // Dogecoin: Add AuxPoW + if (block.nVersion.IsAuxpow()) { + pindexNew->pauxpow = block.auxpow; + assert(NULL != pindexNew->pauxpow.get()); + } pindexNew->RaiseValidity(BLOCK_VALID_TREE); if (pindexBestHeader == NULL || pindexBestHeader->nChainWork < pindexNew->nChainWork) pindexBestHeader = pindexNew; -- cgit v1.2.3