As a minimum I would do this before doing #4692 Although I don't mind to rebase things like this and merge them later.
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-
jtimon commented at 7:14 PM on August 13, 2014: contributor
-
Move CNoDestination and CTxDestination to key.h 8e07949521
-
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.
-
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.
- laanwj closed this on Aug 14, 2014
- jtimon referenced this in commit 3bbfea22f1 on Aug 14, 2014
- jtimon deleted the branch on Aug 14, 2014
- MarcoFalke locked this on Sep 8, 2021
Linked (view graph)