mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Fixes for Elements PR #1270
This commit is contained in:
parent
61b0543ba7
commit
413a175b53
3 changed files with 11 additions and 11 deletions
|
|
@ -257,7 +257,7 @@ CBlockIndex* BlockManager::InsertBlockIndex(const uint256& hash)
|
|||
return pindex;
|
||||
}
|
||||
|
||||
bool BlockManager::LoadBlockIndex(const Consensus::Params& consensus_params)
|
||||
bool BlockManager::LoadBlockIndex(ChainstateManager& chainman, const Consensus::Params& consensus_params)
|
||||
{
|
||||
int trim_below_height = 0;
|
||||
if (fTrimHeaders) {
|
||||
|
|
@ -302,8 +302,8 @@ bool BlockManager::LoadBlockIndex(const Consensus::Params& consensus_params)
|
|||
}
|
||||
}
|
||||
|
||||
if (pindexBestHeader) {
|
||||
ForceUntrimHeader(pindexBestHeader);
|
||||
if (chainman.m_best_header) {
|
||||
ForceUntrimHeader(chainman.m_best_header);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -329,9 +329,9 @@ bool BlockManager::WriteBlockIndexDB()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool BlockManager::LoadBlockIndexDB(const Consensus::Params& consensus_params)
|
||||
bool BlockManager::LoadBlockIndexDB(ChainstateManager& chainman, const Consensus::Params& consensus_params)
|
||||
{
|
||||
if (!LoadBlockIndex(consensus_params)) {
|
||||
if (!LoadBlockIndex(chainman, consensus_params)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue