mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Remove unused chainparams from BlockManager methods
Also, replace pointer with reference while touching the signature.
This commit is contained in:
parent
fa3f74a40e
commit
fa5d7c39eb
4 changed files with 16 additions and 17 deletions
|
|
@ -253,7 +253,7 @@ CBlockIndex* BlockManager::InsertBlockIndex(const uint256& hash)
|
|||
return pindex;
|
||||
}
|
||||
|
||||
bool BlockManager::LoadBlockIndex(const Consensus::Params& consensus_params)
|
||||
bool BlockManager::LoadBlockIndex()
|
||||
{
|
||||
if (!m_block_tree_db->LoadBlockIndexGuts(GetConsensus(), [this](const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main) { return this->InsertBlockIndex(hash); })) {
|
||||
return false;
|
||||
|
|
@ -318,9 +318,9 @@ bool BlockManager::WriteBlockIndexDB()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool BlockManager::LoadBlockIndexDB(const Consensus::Params& consensus_params)
|
||||
bool BlockManager::LoadBlockIndexDB()
|
||||
{
|
||||
if (!LoadBlockIndex(consensus_params)) {
|
||||
if (!LoadBlockIndex()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -720,9 +720,8 @@ static bool WriteBlockToDisk(const CBlock& block, FlatFilePos& pos, const CMessa
|
|||
return true;
|
||||
}
|
||||
|
||||
bool BlockManager::WriteUndoDataForBlock(const CBlockUndo& blockundo, BlockValidationState& state, CBlockIndex* pindex, const CChainParams& chainparams)
|
||||
bool BlockManager::WriteUndoDataForBlock(const CBlockUndo& blockundo, BlockValidationState& state, CBlockIndex& block)
|
||||
{
|
||||
auto& block{*pindex};
|
||||
AssertLockHeld(::cs_main);
|
||||
// Write undo information to disk
|
||||
if (block.GetUndoPos().IsNull()) {
|
||||
|
|
@ -830,7 +829,7 @@ bool ReadRawBlockFromDisk(std::vector<uint8_t>& block, const FlatFilePos& pos, c
|
|||
return true;
|
||||
}
|
||||
|
||||
FlatFilePos BlockManager::SaveBlockToDisk(const CBlock& block, int nHeight, CChain& active_chain, const CChainParams& chainparams, const FlatFilePos* dbp)
|
||||
FlatFilePos BlockManager::SaveBlockToDisk(const CBlock& block, int nHeight, CChain& active_chain, const FlatFilePos* dbp)
|
||||
{
|
||||
unsigned int nBlockSize = ::GetSerializeSize(block, CLIENT_VERSION);
|
||||
FlatFilePos blockPos;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue