Move CNoDestination and CTxDestination to key.h #4698

pull jtimon wants to merge 1 commits into bitcoin:master from jtimon:destination changing 3 files +16 −16
  1. jtimon commented at 7:14 PM on August 13, 2014: contributor

    As a minimum I would do this before doing #4692 Although I don't mind to rebase things like this and merge them later.

  2. Move CNoDestination and CTxDestination to key.h 8e07949521
  3. sipa commented at 7:27 PM on August 13, 2014: member

    NAK. IMHO CTxDestination belongs in script, as it encodes a particular subset of scripts. key.h is a wrapper for ECDSA logic, and works at a lower level.

  4. laanwj commented at 2:07 AM on August 14, 2014: member

    Agree with @sipa here.

    key.h isn't concerned with sending and destinations. There is no functionality using destinations at all in there. It's very low-level.

    In script.h however, there are various utility functions that take a destination. Apart from the wallet it has the most methods involving these:

    void CScript::SetDestination(const CTxDestination& address);
    isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
    bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
    bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
    

    Unless these utilities are somehow split off from the 'core' script interpreter, it makes no sense to move CTxDestination.

  5. laanwj closed this on Aug 14, 2014

  6. jtimon referenced this in commit 3bbfea22f1 on Aug 14, 2014
  7. jtimon deleted the branch on Aug 14, 2014
  8. jtimon cross-referenced this on Aug 23, 2014 from issue Move code from script to wallet by jtimon
  9. jtimon cross-referenced this on Sep 12, 2014 from issue Move CTxDestination from script/script to script/standard by sipa
  10. bitcoin 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-05-19 06:55 UTC