Page MenuHomePhabricator

D11772.id.diff
No OneTemporary

D11772.id.diff

diff --git a/src/validation.cpp b/src/validation.cpp
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -4027,11 +4027,10 @@
// Check for duplicate
BlockHash hash = block.GetHash();
BlockMap::iterator miSelf = m_block_index.find(hash);
- CBlockIndex *pindex = nullptr;
if (hash != chainparams.GetConsensus().hashGenesisBlock) {
if (miSelf != m_block_index.end()) {
// Block header is already known.
- pindex = miSelf->second;
+ CBlockIndex *pindex = miSelf->second;
if (ppindex) {
*ppindex = pindex;
}
@@ -4120,9 +4119,7 @@
}
}
- if (pindex == nullptr) {
- pindex = AddToBlockIndex(block);
- }
+ CBlockIndex *pindex = AddToBlockIndex(block);
if (ppindex) {
*ppindex = pindex;

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 26, 12:08 (2 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5567876
Default Alt Text
D11772.id.diff (837 B)

Event Timeline