Add assertion to guide static analyzers. Clang Static Analyzer needs this guidance.

This commit is contained in:
practicalswift 2018-04-12 08:26:56 +02:00
parent fd447a6efe
commit 159c32d1f1

View file

@ -525,6 +525,7 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
// Need to update only after we know CreateNewBlock succeeded // Need to update only after we know CreateNewBlock succeeded
pindexPrev = pindexPrevNew; pindexPrev = pindexPrevNew;
} }
assert(pindexPrev);
CBlock* pblock = &pblocktemplate->block; // pointer for convenience CBlock* pblock = &pblocktemplate->block; // pointer for convenience
const Consensus::Params& consensusParams = Params().GetConsensus(); const Consensus::Params& consensusParams = Params().GetConsensus();