diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-07-21 21:43:40 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-10-02 15:47:43 +0200 |
commit | 55224af6bdecf79bb0d2c95b16f1ff60b16c45f8 (patch) | |
tree | eec0627e8e6a8b4adef1d41b33160000b702d75c /src/validation.cpp | |
parent | ee50c9e48786dea0d9df2e45805c25565c100fe3 (diff) |
Remove redundant NULL checks after new
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 0bd1ec672b..0da861eb22 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2608,7 +2608,6 @@ static CBlockIndex* AddToBlockIndex(const CBlockHeader& block) // Construct new block index object CBlockIndex* pindexNew = new CBlockIndex(block); - assert(pindexNew); // We assign the sequence id to blocks only when the full data is available, // to avoid miners withholding blocks but broadcasting headers, to get a // competitive advantage. @@ -3434,8 +3433,6 @@ CBlockIndex * InsertBlockIndex(uint256 hash) // Create new CBlockIndex* pindexNew = new CBlockIndex(); - if (!pindexNew) - throw std::runtime_error(std::string(__func__) + ": new CBlockIndex failed"); mi = mapBlockIndex.insert(std::make_pair(hash, pindexNew)).first; pindexNew->phashBlock = &((*mi).first); |