Page MenuHomePhabricator

D11744.id.diff
No OneTemporary

D11744.id.diff

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 &params)
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

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)

Event Timeline