File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4130,10 +4130,10 @@ std::vector<unsigned char> ChainstateManager::GenerateCoinbaseCommitment(CBlock&
41304130 return commitment;
41314131}
41324132
4133- bool HasValidProofOfWork (const std::vector< CBlockHeader>& headers, const Consensus::Params& consensusParams)
4133+ bool HasValidProofOfWork (std::span< const CBlockHeader> headers, const Consensus::Params& consensusParams)
41344134{
4135- return std::all_of (headers. cbegin (), headers. cend () ,
4136- [&](const auto & header) { return CheckProofOfWork (header.GetHash (), header.nBits , consensusParams);});
4135+ return std::ranges:: all_of (headers,
4136+ [&](const auto & header) { return CheckProofOfWork (header.GetHash (), header.nBits , consensusParams); });
41374137}
41384138
41394139bool IsBlockMutated (const CBlock& block, bool check_witness_root)
Original file line number Diff line number Diff line change @@ -410,8 +410,8 @@ BlockValidationState TestBlockValidity(
410410 bool check_pow,
411411 bool check_merkle_root) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
412412
413- /* * Check with the proof of work on each blockheader matches the value in nBits */
414- bool HasValidProofOfWork (const std::vector< CBlockHeader>& headers, const Consensus::Params& consensusParams);
413+ /* * Check that the proof of work on each blockheader matches the value in nBits */
414+ bool HasValidProofOfWork (std::span< const CBlockHeader> headers, const Consensus::Params& consensusParams);
415415
416416/* * Check if a block has been mutated (with respect to its merkle root and witness commitments). */
417417bool IsBlockMutated (const CBlock& block, bool check_witness_root);
You can’t perform that action at this time.
0 commit comments