From 5d891489ab7828ad8db15e85bb63e2f13f021a6a Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 30 Apr 2013 21:56:04 +0200 Subject: Make CPubKey statically allocated --- src/script.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/script.h') diff --git a/src/script.h b/src/script.h index 4b29f6273..e63900354 100644 --- a/src/script.h +++ b/src/script.h @@ -348,8 +348,10 @@ public: CScript& operator<<(const CPubKey& key) { - std::vector 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) -- cgit v1.2.3 From dfa23b94c24aae6466152fccbe896ba5dc0e97b4 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 1 May 2013 06:52:05 +0200 Subject: CSecret/CKey -> CKey/CPubKey split/refactor --- src/script.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script.h') diff --git a/src/script.h b/src/script.h index e63900354..3cbb2cf32 100644 --- a/src/script.h +++ b/src/script.h @@ -550,7 +550,7 @@ public: void SetDestination(const CTxDestination& address); - void SetMultisig(int nRequired, const std::vector& keys); + void SetMultisig(int nRequired, const std::vector& keys); void PrintHex() const @@ -621,7 +621,7 @@ protected: // form). bool IsToKeyID(CKeyID &hash) const; bool IsToScriptID(CScriptID &hash) const; - bool IsToPubKey(std::vector &pubkey) const; + bool IsToPubKey(CPubKey &pubkey) const; bool Compress(std::vector &out) const; unsigned int GetSpecialSize(unsigned int nSize) const; -- cgit v1.2.3