Move CTxDestination from script/script to script/standard #4899

pull sipa wants to merge 1 commits into bitcoin:master from sipa:standarddest changing 22 files +122 −122
  1. sipa commented at 2:06 AM on September 12, 2014: member

    This removes CTxDestination (which is really about standard template scripts) from the core script dependency.

  2. jtimon commented at 2:56 PM on September 12, 2014: contributor

    Great, this is basically what we discussed in #4698 and #4755. Sorry again about trying to randomly moving it down to key and base58 when it really had to move up. I knew I didn't like it in script/script. Untested ACK

  3. jgarzik commented at 1:24 AM on September 15, 2014: contributor

    ut ACK

  4. in src/script/standard.cpp:None in b5a6b22240 outdated
     284 | +bool SetScriptToDestination(CScript& script, const CTxDestination& dest)
     285 | +{
     286 | +    return boost::apply_visitor(CScriptVisitor(&script), dest);
     287 | +}
     288 | +
     289 | +void SetScriptToMultisig(CScript& script, int nRequired, const std::vector<CPubKey>& keys)
    


    laanwj commented at 11:13 AM on September 15, 2014:

    Just a random idea: maybe instead of void SetScriptTo...(...), we could change this API to CScript GetScriptFor...(...). These functions clear out the script and replace it with something else, so unless I'm missing something, there no need to pass in an initial script.

    ie, instead of having

    Script script; SetScriptToDestination(script, dest);
    

    everywhere, this would allow

    Script script = GetScriptForDestination(dest);
    

    (I know in the case of SetScriptToDestination there is a return value, but if I saw correctly we ignore it everywhere...)

    Edit: (doesn't need to be in this pull, of course)

  5. jtimon commented at 4:58 PM on September 15, 2014: contributor

    +1 to @laanwj's suggestion, I like GetScriptForDestination() more than SetScriptToDestination(). Maybe GetScriptFromDestination(), but that's bike shedding.

  6. sipa force-pushed on Sep 15, 2014
  7. sipa commented at 5:42 PM on September 15, 2014: member

    Agree; changed it to GetScriptFor...().

  8. laanwj commented at 9:10 AM on September 16, 2014: member

    ACK (after rebase)

  9. Move CTxDestination from script/script to script/standard 0be990ba34
  10. sipa force-pushed on Sep 16, 2014
  11. sipa commented at 5:18 PM on September 16, 2014: member

    Rebased.

  12. BitcoinPullTester commented at 5:33 PM on September 16, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4899_0be990ba34110184c8a5a2c04094311dab5cd84c/ 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.

  13. laanwj merged this on Sep 17, 2014
  14. laanwj closed this on Sep 17, 2014

  15. laanwj referenced this in commit 69dd8c919a on Sep 17, 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-18 18:15 UTC

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