diff options
| author | Jeff Garzik <[email protected]> | 2013-05-30 07:55:25 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2013-05-30 07:55:25 -0700 |
| commit | e2f42142a03fa817a7fe6529fc1d55ef2d016352 (patch) | |
| tree | a298361e95260b418a2bf82665390441e954954e /src/script.h | |
| parent | Merge pull request #2693 from jgarzik/checkpoint-bool (diff) | |
| parent | Make signature cache store CPubKeys (diff) | |
| download | discoin-e2f42142a03fa817a7fe6529fc1d55ef2d016352.tar.xz discoin-e2f42142a03fa817a7fe6529fc1d55ef2d016352.zip | |
Merge pull request #2600 from sipa/keyrefactor
Refactor key.cpp/.h
Diffstat (limited to 'src/script.h')
| -rw-r--r-- | src/script.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/script.h b/src/script.h index 4b29f6273..3cbb2cf32 100644 --- a/src/script.h +++ b/src/script.h @@ -348,8 +348,10 @@ public: CScript& operator<<(const CPubKey& key) { - std::vector<unsigned char> vchKey = key.Raw(); - return (*this) << vchKey; + assert(key.size() < OP_PUSHDATA1); + insert(end(), (unsigned char)key.size()); + insert(end(), key.begin(), key.end()); + return *this; } CScript& operator<<(const CBigNum& b) @@ -548,7 +550,7 @@ public: void SetDestination(const CTxDestination& address); - void SetMultisig(int nRequired, const std::vector<CKey>& keys); + void SetMultisig(int nRequired, const std::vector<CPubKey>& keys); void PrintHex() const @@ -619,7 +621,7 @@ protected: // form). bool IsToKeyID(CKeyID &hash) const; bool IsToScriptID(CScriptID &hash) const; - bool IsToPubKey(std::vector<unsigned char> &pubkey) const; + bool IsToPubKey(CPubKey &pubkey) const; bool Compress(std::vector<unsigned char> &out) const; unsigned int GetSpecialSize(unsigned int nSize) const; |