Move CNoDestination and CTxDestination to key.h#4698
Closed
jtimon wants to merge 1 commit intobitcoin:masterfrom
Closed
Move CNoDestination and CTxDestination to key.h#4698jtimon wants to merge 1 commit intobitcoin:masterfrom
jtimon wants to merge 1 commit intobitcoin:masterfrom
Conversation
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. |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As a minimum I would do this before doing #4692
Although I don't mind to rebase things like this and merge them later.