Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14865004
D11744.id.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
D11744.id.diff
View Options
diff --git a/src/validation.h b/src/validation.h
--- a/src/validation.h
+++ b/src/validation.h
@@ -1051,6 +1051,9 @@
bool LoadBlockIndexDB(const Consensus::Params ¶ms)
EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+ const CBlockIndex *FindBlockToFinalize(CBlockIndex *pindexNew)
+ EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+
friend ChainstateManager;
};
diff --git a/src/validation.cpp b/src/validation.cpp
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2451,8 +2451,7 @@
return true;
}
-static const CBlockIndex *FindBlockToFinalize(CBlockIndex *pindexNew)
- EXCLUSIVE_LOCKS_REQUIRED(cs_main) {
+const CBlockIndex *CChainState::FindBlockToFinalize(CBlockIndex *pindexNew) {
AssertLockHeld(cs_main);
const int32_t maxreorgdepth =
@@ -2478,7 +2477,7 @@
// While our candidate is not eligible (finalization delay not expired), try
// the previous one.
- while (pindex && (pindex != ::ChainstateActive().GetFinalizedBlock())) {
+ while (pindex && (pindex != GetFinalizedBlock())) {
// Check that the block to finalize is known for a long enough time.
// This test will ensure that an attacker could not cause a block to
// finalize by forking the chain with a depth > maxreorgdepth.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 21, 00:16 (1 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5864541
Default Alt Text
D11744.id.diff (1 KB)
Attached To
D11744: make FindBlockToFinalize a CChainState member
Event Timeline
Log In to Comment