Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14864516
D4945.id15476.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D4945.id15476.diff
View Options
diff --git a/src/validation.cpp b/src/validation.cpp
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -3126,6 +3126,7 @@
bool FinalizeBlockAndInvalidate(const Config &config, CValidationState &state,
CBlockIndex *pindex) {
+ CBlockIndex *pindexToInvalidate;
{
LOCK(cs_main);
if (!FinalizeBlockInternal(config, state, pindex)) {
@@ -3137,16 +3138,16 @@
if (pindex->nStatus.isOnParkedChain()) {
UnparkBlock(pindex);
}
- }
- // If the finalized block is not on the active chain, we need to rewind.
- if (AreOnTheSameFork(pindex, chainActive.Tip())) {
- return true;
- }
+ // If the finalized block is not on the active chain, we need to rewind.
+ if (AreOnTheSameFork(pindex, chainActive.Tip())) {
+ return true;
+ }
- const CBlockIndex *pindexFork = chainActive.FindFork(pindex);
- CBlockIndex *pindexToInvalidate =
- chainActive.Tip()->GetAncestor(pindexFork->nHeight + 1);
+ const CBlockIndex *pindexFork = chainActive.FindFork(pindex);
+ pindexToInvalidate =
+ chainActive.Tip()->GetAncestor(pindexFork->nHeight + 1);
+ }
return InvalidateBlock(config, state, pindexToInvalidate);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 20, 20:15 (9 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5865442
Default Alt Text
D4945.id15476.diff (1 KB)
Attached To
D4945: Revert D4942 locking 'time'
Event Timeline
Log In to Comment