mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Remove redundant NULL checks after new
This commit is contained in:
parent
ee50c9e487
commit
55224af6bd
1 changed files with 0 additions and 3 deletions
|
@ -2608,7 +2608,6 @@ static CBlockIndex* AddToBlockIndex(const CBlockHeader& block)
|
||||||
|
|
||||||
// Construct new block index object
|
// Construct new block index object
|
||||||
CBlockIndex* pindexNew = new CBlockIndex(block);
|
CBlockIndex* pindexNew = new CBlockIndex(block);
|
||||||
assert(pindexNew);
|
|
||||||
// We assign the sequence id to blocks only when the full data is available,
|
// 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
|
// to avoid miners withholding blocks but broadcasting headers, to get a
|
||||||
// competitive advantage.
|
// competitive advantage.
|
||||||
|
@ -3434,8 +3433,6 @@ CBlockIndex * InsertBlockIndex(uint256 hash)
|
||||||
|
|
||||||
// Create new
|
// Create new
|
||||||
CBlockIndex* pindexNew = new CBlockIndex();
|
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;
|
mi = mapBlockIndex.insert(std::make_pair(hash, pindexNew)).first;
|
||||||
pindexNew->phashBlock = &((*mi).first);
|
pindexNew->phashBlock = &((*mi).first);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue