mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge 19032c750c into merged_master (Bitcoin PR #18612)
This commit is contained in:
commit
ba95deb36c
3 changed files with 24 additions and 61 deletions
|
|
@ -431,28 +431,15 @@ public:
|
|||
READWRITEAS(CScriptBase, *this);
|
||||
}
|
||||
|
||||
CScript& operator+=(const CScript& b)
|
||||
{
|
||||
reserve(size() + b.size());
|
||||
insert(end(), b.begin(), b.end());
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend CScript operator+(const CScript& a, const CScript& b)
|
||||
{
|
||||
CScript ret = a;
|
||||
ret += b;
|
||||
return ret;
|
||||
}
|
||||
|
||||
explicit CScript(int64_t b) { operator<<(b); }
|
||||
|
||||
explicit CScript(opcodetype b) { operator<<(b); }
|
||||
explicit CScript(const CScriptNum& b) { operator<<(b); }
|
||||
// delete non-existent constructor to defend against future introduction
|
||||
// e.g. via prevector
|
||||
explicit CScript(const std::vector<unsigned char>& b) = delete;
|
||||
|
||||
/** Delete non-existent operator to defend against future introduction */
|
||||
CScript& operator<<(const CScript& b) = delete;
|
||||
|
||||
CScript& operator<<(int64_t b) { return push_int64(b); }
|
||||
|
||||
|
|
@ -499,15 +486,6 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
CScript& operator<<(const CScript& b)
|
||||
{
|
||||
// I'm not sure if this should push the script or concatenate scripts.
|
||||
// If there's ever a use for pushing a script onto a script, delete this member fn
|
||||
assert(!"Warning: Pushing a CScript onto a CScript with << is probably not intended, use + to concatenate!");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
bool GetOp(const_iterator& pc, opcodetype& opcodeRet, std::vector<unsigned char>& vchRet) const
|
||||
{
|
||||
return GetScriptOp(pc, end(), opcodeRet, &vchRet);
|
||||
|
|
@ -518,7 +496,6 @@ public:
|
|||
return GetScriptOp(pc, end(), opcodeRet, nullptr);
|
||||
}
|
||||
|
||||
|
||||
/** Encode/decode small integers: */
|
||||
static int DecodeOP_N(opcodetype opcode)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue