This commit is contained in:
jl777
2016-10-20 16:29:56 -03:00
parent b93286c28e
commit 4f5e03dbde
2 changed files with 4 additions and 6 deletions

View File

@@ -3137,8 +3137,8 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
return true; return true;
} }
//if (!CheckBlockHeader((*ppindex)->nHeight,*ppindex, block, state)) if (!CheckBlockHeader(*ppindex!=0?(*ppindex)->nHeight:0,*ppindex, block, state))
// return false; return false;
// Get prev block index // Get prev block index
CBlockIndex* pindexPrev = NULL; CBlockIndex* pindexPrev = NULL;

View File

@@ -352,14 +352,12 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
pblock->hashPrevBlock = pindexPrev->GetBlockHash(); pblock->hashPrevBlock = pindexPrev->GetBlockHash();
pblock->hashReserved = uint256(); pblock->hashReserved = uint256();
UpdateTime(pblock, Params().GetConsensus(), pindexPrev); UpdateTime(pblock, Params().GetConsensus(), pindexPrev);
extern int32_t IS_KOMODO_NOTARY; pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, Params().GetConsensus());
if ( 0 && IS_KOMODO_NOTARY != 0 )
pblock->nBits = KOMODO_MINDIFF_NBITS;
else pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, Params().GetConsensus());
pblock->nSolution.clear(); pblock->nSolution.clear();
pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]); pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);
CValidationState state; CValidationState state;
//need to fix this and also ht specific notarized ht
if ( 0 && !TestBlockValidity(state, *pblock, pindexPrev, false, false)) if ( 0 && !TestBlockValidity(state, *pblock, pindexPrev, false, false))
throw std::runtime_error("CreateNewBlock(): TestBlockValidity failed"); throw std::runtime_error("CreateNewBlock(): TestBlockValidity failed");
} }