From 159c32d1f111e6bad490bd23ae215462e8ba4374 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Thu, 12 Apr 2018 08:26:56 +0200 Subject: [PATCH] Add assertion to guide static analyzers. Clang Static Analyzer needs this guidance. --- src/rpc/mining.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 75bc98320..313f3310e 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -525,6 +525,7 @@ UniValue getblocktemplate(const JSONRPCRequest& request) // Need to update only after we know CreateNewBlock succeeded pindexPrev = pindexPrevNew; } + assert(pindexPrev); CBlock* pblock = &pblocktemplate->block; // pointer for convenience const Consensus::Params& consensusParams = Params().GetConsensus();