refactor: mining interface 30955 followups #31197

pull Sjors wants to merge 3 commits into bitcoin:master from Sjors:2024/10/pr30955-followups changing 5 files +22 −24
  1. Sjors commented at 6:07 pm on October 31, 2024: member
    This PR implements the refactors suggested in #30955#pullrequestreview-2354931253.
  2. Rename merkle branch to path 030332e11c
  3. Drop TransactionMerklePath default position arg 01e33928fb
  4. refactor: use CTransactionRef in submitSolution 0588625810
  5. DrahtBot commented at 6:07 pm on October 31, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31197.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK ryanofsky, TheCharlatan

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  6. DrahtBot added the label Refactoring on Oct 31, 2024
  7. Skate-Cloud approved
  8. AlexWater123456789 approved
  9. ryanofsky approved
  10. ryanofsky commented at 1:49 pm on November 5, 2024: contributor
    Code review ACK 058862581085316927287817b2af01e8f4765a1d. Looks good, thanks for the cleanups!
  11. in src/consensus/merkle.cpp:87 in 0588625810
    83@@ -84,8 +84,8 @@ uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated)
    84 }
    85 
    86 /* This implements a constant-space merkle root/path calculator, limited to 2^32 leaves. */
    87-static void MerkleComputation(const std::vector<uint256>& leaves, uint256* proot, bool* pmutated, uint32_t branchpos, std::vector<uint256>* pbranch) {
    88-    if (pbranch) pbranch->clear();
    89+static void MerkleComputation(const std::vector<uint256>& leaves, uint256* proot, bool* pmutated, uint32_t leaf_pos, std::vector<uint256>* path) {
    


    TheCharlatan commented at 8:15 am on November 8, 2024:
    Nit: Since this is a style fix in the first place already, could also put the bracket on a new line to make clang-format happy.

    Sjors commented at 3:30 pm on November 8, 2024:
    Will do if I need to retouch.
  12. TheCharlatan approved
  13. TheCharlatan commented at 8:17 am on November 8, 2024: contributor
    ACK 058862581085316927287817b2af01e8f4765a1d

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me