Move CMerkleBlock and CPartialMerkleTree to their own file #5181

pull TheBlueMatt wants to merge 1 commits into bitcoin:master from TheBlueMatt:merklesplit changing 9 files +318 −294
  1. TheBlueMatt commented at 10:51 PM on October 30, 2014: member

    Code move only.

  2. in src/merkleblock.cpp:None in e057989f92 outdated
       5 | +
       6 | +#include "merkleblock.h"
       7 | +
       8 | +#include "hash.h"
       9 | +//#include "main.h" // for MAX_BLOCK_SIZE
      10 | +static const unsigned int MAX_BLOCK_SIZE = 1000000;
    


    theuni commented at 2:14 AM on October 31, 2014:

    Can we move out of main instead of duplicating it? Other files need this too and could drop their dependency on main.h (bitcoin-tx.cpp for ex).


    TheBlueMatt commented at 4:04 AM on October 31, 2014:

    Oops, that was a test, didnt mean to leave that duplication in there...anyway, yea, it should be moved out.

  3. theuni commented at 2:16 AM on October 31, 2014: member

    Verified move-only other than the necessary header changes and the MAX_BLOCK_SIZE change I nagged about.

  4. in src/merkleblock.h:None in e057989f92 outdated
       0 | @@ -0,0 +1,145 @@
       1 | +// Copyright (c) 2009-2010 Satoshi Nakamoto
       2 | +// Copyright (c) 2009-2014 The Bitcoin developers
       3 | +// Distributed under the MIT software license, see the accompanying
       4 | +// file COPYING or http://www.opensource.org/licenses/mit-license.php.
       5 | +
       6 | +#ifndef BITCOIN_MERKLEBLOCK_H
       7 | +#define BITCOIN_MERKLEBLOCK_H
       8 | +
       9 | +#include <vector>
    


    Diapolo commented at 9:04 AM on October 31, 2014:

    Can you keep the header include and ordering policy please.

  5. TheBlueMatt commented at 5:03 AM on November 2, 2014: member

    I moved MAX_BLOCK_SIZE to core/block.h, though in a separate commit, merger can chose to include that or not based on random coin flip (as long as its fair based on bitcoin block hashes).

  6. sipa commented at 5:48 PM on November 3, 2014: member

    utACK, and verified e057989f92af63ef336f6620ebe77ea8c9255f9a move-only.

  7. TheBlueMatt force-pushed on Dec 5, 2014
  8. TheBlueMatt commented at 9:53 AM on December 5, 2014: member

    Rebased, squashed.

  9. Move CMerkleBlock and CPartialMerkleTree to their own file afd4b94b6d
  10. TheBlueMatt force-pushed on Dec 5, 2014
  11. laanwj commented at 11:17 AM on December 5, 2014: member

    Oh this moves things out of main.cpp/h. That's nice! ACK verified move-only commithash afd4b94b6dabab29dee5a12966ce217700381682 (signature)

  12. laanwj added this to the milestone 0.10.0 on Dec 5, 2014
  13. laanwj merged this on Dec 5, 2014
  14. laanwj closed this on Dec 5, 2014

  15. laanwj referenced this in commit b5fa132329 on Dec 5, 2014
  16. MarcoFalke locked this on Sep 8, 2021

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: 2026-04-13 15:15 UTC

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