Remove unnecessary typedef and script.h include #4680

pull jtimon wants to merge 1 commits into bitcoin:master from jtimon:keystore changing 1 files +0 −9
  1. jtimon commented at 7:29 pm on August 11, 2014: contributor
    script.h is included to define CTxDestination, which is already defined in script.h and not used here. Look like rests from a refactor waiting to be cleaned up.
  2. jgarzik commented at 7:34 pm on August 11, 2014: contributor

    This is incorrect. script.h is very clearly used. Do not assume based on a buggy comment… You must review the header for structures and defines found in script.h before proposing removal.

    NAK that bit.

    The typedef is a duplicate, correct.

  3. jtimon commented at 7:55 pm on August 11, 2014: contributor
    What in keystore.h requires script.h? What is class CScript; for then?
  4. jgarzik commented at 8:15 pm on August 11, 2014: contributor

    hmmm. As I understood it, you want to include the header for references… but looking more closely, I see all references are either typedef or virtual. There is never a need for the compiler to explore or size the structure. Apologies.

    ut ACK

  5. jtimon commented at 9:14 pm on August 11, 2014: contributor
    Thanks, then base58.h doesn’t seem to need script.h either.
  6. jtimon renamed this:
    Remove unnecessary typedef and script.h include
    Remove unnecessary script.h includes
    on Aug 11, 2014
  7. jgarzik commented at 9:27 pm on August 11, 2014: contributor

    @jtimon script.h inclusion is only correct if the symbols are defined somewhere. The keystore.h update was correct because it included “class CScript;”

    The base58.h update is incorrect, as something is required to define CScriptID and CTxDestination. This gets back to direct/indirect issue that @sipa referenced in #4674.

  8. jtimon commented at 11:43 pm on August 11, 2014: contributor
    I understood the criterion in 4674, but in this case I really thought that base58.h was script.h-independent: CScriptID is declared in key.h and I missed CTxDestination. But in fact it could be easily moved with CNoDestination from script.h to key.h, since they only depends on CKeyID and CScriptID (defined in key.h). Anyway, I’ll leave the old version without touching base58 and think better how this fits with other changes I’m working on around script.
  9. jtimon renamed this:
    Remove unnecessary script.h includes
    Remove unnecessary typedef and script.h include
    on Aug 11, 2014
  10. Remove unnecessary typedef and script.h include a381ee5d1c
  11. BitcoinPullTester commented at 0:33 am on August 12, 2014: none
    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4680_a381ee5d1c1c01c66e681e245f60f2de2b79b264/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
  12. laanwj merged this on Aug 12, 2014
  13. laanwj closed this on Aug 12, 2014

  14. laanwj referenced this in commit a63e86e01d on Aug 12, 2014
  15. jtimon deleted the branch on Aug 12, 2014
  16. DrahtBot 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: 2024-09-29 13:12 UTC

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