diff options
| author | Pieter Wuille <[email protected]> | 2017-07-07 00:54:42 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2017-07-07 10:45:31 -0700 |
| commit | 0aadc11fd88b298c7af2dfb69763b2c67dc6b7b0 (patch) | |
| tree | 02bb833749f472a916c9ff5f585af9e94b5326b8 /src/script/script.h | |
| parent | Merge #10698: Be consistent in calling transactions "replaceable" for Opt-In RBF (diff) | |
| download | discoin-0aadc11fd88b298c7af2dfb69763b2c67dc6b7b0.tar.xz discoin-0aadc11fd88b298c7af2dfb69763b2c67dc6b7b0.zip | |
Avoid dereference-of-casted-pointer
Diffstat (limited to 'src/script/script.h')
| -rw-r--r-- | src/script/script.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/script/script.h b/src/script/script.h index bbb37f049..d16bfd0e0 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -8,6 +8,7 @@ #include "crypto/common.h" #include "prevector.h" +#include "serialize.h" #include <assert.h> #include <climits> @@ -404,6 +405,13 @@ public: CScript(std::vector<unsigned char>::const_iterator pbegin, std::vector<unsigned char>::const_iterator pend) : CScriptBase(pbegin, pend) { } CScript(const unsigned char* pbegin, const unsigned char* pend) : CScriptBase(pbegin, pend) { } + ADD_SERIALIZE_METHODS; + + template <typename Stream, typename Operation> + inline void SerializationOp(Stream& s, Operation ser_action) { + READWRITE(static_cast<CScriptBase&>(*this)); + } + CScript& operator+=(const CScript& b) { insert(end(), b.begin(), b.end()); |