Skip to content

Commit

Permalink
refactor: Don't use global chainparams in chainstatemanager method
Browse files Browse the repository at this point in the history
The chainstatemanager m_options.chainparams member variable gets its
value from the global chainparams in init.cpp. This allows
validation.cpp to only include the the kernel chainparams file.
  • Loading branch information
TheCharlatan committed Mar 8, 2023
1 parent ffa8543 commit a7afa98
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include <arith_uint256.h>
#include <chain.h>
#include <chainparams.h>
#include <checkqueue.h>
#include <consensus/amount.h>
#include <consensus/consensus.h>
Expand Down Expand Up @@ -5430,7 +5429,7 @@ SnapshotCompletionResult ChainstateManager::MaybeCompleteSnapshotValidation(
CCoinsViewDB& ibd_coins_db = m_ibd_chainstate->CoinsDB();
m_ibd_chainstate->ForceFlushStateToDisk();

auto maybe_au_data = ExpectedAssumeutxo(curr_height, ::Params());
auto maybe_au_data = ExpectedAssumeutxo(curr_height, m_options.chainparams);
if (!maybe_au_data) {
LogPrintf("[snapshot] assumeutxo data not found for height " /* Continued */
"(%d) - refusing to validate snapshot\n", curr_height);
Expand Down

0 comments on commit a7afa98

Please sign in to comment.