Break circular dependency: chain -> pow -> chain #13234

pull Empact wants to merge 1 commits into bitcoin:master from Empact:chain-pow-chain changing 3 files +3 −1
  1. Empact commented at 12:02 AM on May 15, 2018: member

    chain.h does not actually depend on the methods defined in pow.h, just its include of consensus/params.h, which is standalone and can be included instead.

    Confirmed by inspection and successful build.

  2. Empact commented at 12:03 AM on May 15, 2018: member

    Prompted by #13228

  3. fanquake added the label Refactoring on May 15, 2018
  4. in src/chain.h:10 in 53dd65a723 outdated
       7 | @@ -8,7 +8,7 @@
       8 |  
       9 |  #include <arith_uint256.h>
      10 |  #include <primitives/block.h>
      11 | -#include <pow.h>
      12 | +#include <consensus/params.h>
    


    promag commented at 12:06 AM on May 15, 2018:

    nit, sort.

  5. promag commented at 12:14 AM on May 15, 2018: member

    Tested ACK 53dd65a, circular dependency is removed.

  6. Empact force-pushed on May 15, 2018
  7. Break circular dependency: chain -> pow -> chain
    chain.h does not actually depend on the methods defined in pow.h, just its
    include of consensus/params.h, which is standalone and can be included instead.
    
    Confirmed by inspection and successful build.
    5b35b92768
  8. Empact force-pushed on May 15, 2018
  9. Empact commented at 1:37 AM on May 15, 2018: member

    Sorted includes

  10. sipa commented at 1:37 AM on May 15, 2018: member

    utACK

  11. fanquake commented at 4:12 AM on May 15, 2018: member
  12. practicalswift commented at 7:19 AM on May 15, 2018: contributor

    utACK 5b35b9276858f6841ab4b688883461f602e9f937

    Very nice! Thanks for tackling this.

  13. laanwj merged this on May 15, 2018
  14. laanwj closed this on May 15, 2018

  15. laanwj referenced this in commit 3b84ebb5bc on May 15, 2018
  16. Empact deleted the branch on May 15, 2018
  17. jasonbcox referenced this in commit e97fe17744 on Sep 27, 2019
  18. PastaPastaPasta referenced this in commit 1ab0fe04df on Jun 17, 2020
  19. PastaPastaPasta referenced this in commit b34702a866 on Jun 27, 2020
  20. PastaPastaPasta referenced this in commit d52be45d92 on Jun 28, 2020
  21. PastaPastaPasta referenced this in commit 311f58d400 on Jun 29, 2020
  22. PastaPastaPasta referenced this in commit 6b3507244e on Jul 1, 2020
  23. 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-22 06:15 UTC

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