Skip to content

Commit 159c32d

Browse files
Add assertion to guide static analyzers. Clang Static Analyzer needs this guidance.
1 parent fd447a6 commit 159c32d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rpc/mining.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
525525
// Need to update only after we know CreateNewBlock succeeded
526526
pindexPrev = pindexPrevNew;
527527
}
528+
assert(pindexPrev);
528529
CBlock* pblock = &pblocktemplate->block; // pointer for convenience
529530
const Consensus::Params& consensusParams = Params().GetConsensus();
530531

0 commit comments

Comments
 (0)