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 4b29f6273c..e639003549 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