Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13711469
D11772.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
837 B
Subscribers
None
D11772.id.diff
View Options
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
Details
Attached
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)
Attached To
D11772: validation: remove redundant check on pindex
Event Timeline
Log In to Comment