diff options
author | Matt Corallo <git@bluematt.me> | 2015-06-10 00:03:08 -0700 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2015-07-20 16:01:37 -0700 |
commit | cfc3dd34284357262bcc7eef2714a210891276c0 (patch) | |
tree | 5f1ccca3a6dc5a01e1a25d161903586d8b5112ea /src/script | |
parent | 6d6b11e793a2d1a106238a2838f5df1d3124217b (diff) |
Also remove pay-2-pubkey from watch when adding a priv key
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/standard.cpp | 5 | ||||
-rw-r--r-- | src/script/standard.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/script/standard.cpp b/src/script/standard.cpp index 66657127ab..1d5aac7b34 100644 --- a/src/script/standard.cpp +++ b/src/script/standard.cpp @@ -286,6 +286,11 @@ CScript GetScriptForDestination(const CTxDestination& dest) return script; } +CScript GetScriptForRawPubKey(const CPubKey& pubKey) +{ + return CScript() << std::vector<unsigned char>(pubKey.begin(), pubKey.end()) << OP_CHECKSIG; +} + CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys) { CScript script; diff --git a/src/script/standard.h b/src/script/standard.h index 46ae5f9f10..9e17dac700 100644 --- a/src/script/standard.h +++ b/src/script/standard.h @@ -73,6 +73,7 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet) bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet); CScript GetScriptForDestination(const CTxDestination& dest); +CScript GetScriptForRawPubKey(const CPubKey& pubkey); CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys); #endif // BITCOIN_SCRIPT_STANDARD_H |