diff options
| author | practicalswift <[email protected]> | 2018-04-12 08:26:56 +0200 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2018-04-12 14:37:53 +0200 |
| commit | 159c32d1f111e6bad490bd23ae215462e8ba4374 (patch) | |
| tree | 8992ae634d7e8aa4a336a5652cc8165302c6f284 /src | |
| parent | Fix dead stores. Values were stored but never read. Limit scope. (diff) | |
| download | discoin-159c32d1f111e6bad490bd23ae215462e8ba4374.tar.xz discoin-159c32d1f111e6bad490bd23ae215462e8ba4374.zip | |
Add assertion to guide static analyzers. Clang Static Analyzer needs this guidance.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rpc/mining.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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(); |