diff options
| author | Pieter Wuille <[email protected]> | 2013-04-30 21:56:04 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2013-05-30 05:18:42 +0200 |
| commit | 5d891489ab7828ad8db15e85bb63e2f13f021a6a (patch) | |
| tree | 24cd213e276977570de5b299872368bdf70ac929 /src/script.h | |
| parent | Merge pull request #2671 from bytemaster/master (diff) | |
| download | discoin-5d891489ab7828ad8db15e85bb63e2f13f021a6a.tar.xz discoin-5d891489ab7828ad8db15e85bb63e2f13f021a6a.zip | |
Make CPubKey statically allocated
Diffstat (limited to 'src/script.h')
| -rw-r--r-- | src/script.h | 6 |
1 files changed, 4 insertions, 2 deletions
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<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) |