mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
merge bitcoin#22278: Add LIFETIMEBOUND to CScript where needed
This commit is contained in:
parent
045e178730
commit
d19ffd613a
@ -6,6 +6,7 @@
|
|||||||
#ifndef BITCOIN_SCRIPT_SCRIPT_H
|
#ifndef BITCOIN_SCRIPT_SCRIPT_H
|
||||||
#define BITCOIN_SCRIPT_SCRIPT_H
|
#define BITCOIN_SCRIPT_SCRIPT_H
|
||||||
|
|
||||||
|
#include <attributes.h>
|
||||||
#include <crypto/common.h>
|
#include <crypto/common.h>
|
||||||
#include <prevector.h>
|
#include <prevector.h>
|
||||||
#include <serialize.h>
|
#include <serialize.h>
|
||||||
@ -426,9 +427,9 @@ public:
|
|||||||
/** Delete non-existent operator to defend against future introduction */
|
/** Delete non-existent operator to defend against future introduction */
|
||||||
CScript& operator<<(const CScript& b) = delete;
|
CScript& operator<<(const CScript& b) = delete;
|
||||||
|
|
||||||
CScript& operator<<(int64_t b) { return push_int64(b); }
|
CScript& operator<<(int64_t b) LIFETIMEBOUND { return push_int64(b); }
|
||||||
|
|
||||||
CScript& operator<<(opcodetype opcode)
|
CScript& operator<<(opcodetype opcode) LIFETIMEBOUND
|
||||||
{
|
{
|
||||||
if (opcode < 0 || opcode > 0xff)
|
if (opcode < 0 || opcode > 0xff)
|
||||||
throw std::runtime_error("CScript::operator<<(): invalid opcode");
|
throw std::runtime_error("CScript::operator<<(): invalid opcode");
|
||||||
@ -436,13 +437,13 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CScript& operator<<(const CScriptNum& b)
|
CScript& operator<<(const CScriptNum& b) LIFETIMEBOUND
|
||||||
{
|
{
|
||||||
*this << b.getvch();
|
*this << b.getvch();
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CScript& operator<<(const std::vector<unsigned char>& b)
|
CScript& operator<<(const std::vector<unsigned char>& b) LIFETIMEBOUND
|
||||||
{
|
{
|
||||||
if (b.size() < OP_PUSHDATA1)
|
if (b.size() < OP_PUSHDATA1)
|
||||||
{
|
{
|
||||||
|
@ -897,7 +897,7 @@ public:
|
|||||||
const std::unique_ptr<llmq::CChainLocksHandler>& clhandler,
|
const std::unique_ptr<llmq::CChainLocksHandler>& clhandler,
|
||||||
const std::unique_ptr<llmq::CInstantSendManager>& isman,
|
const std::unique_ptr<llmq::CInstantSendManager>& isman,
|
||||||
const std::optional<uint256>& snapshot_blockhash = std::nullopt)
|
const std::optional<uint256>& snapshot_blockhash = std::nullopt)
|
||||||
EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
LIFETIMEBOUND EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||||
|
|
||||||
//! Get all chainstates currently being used.
|
//! Get all chainstates currently being used.
|
||||||
std::vector<CChainState*> GetAll();
|
std::vector<CChainState*> GetAll();
|
||||||
|
Loading…
Reference in New Issue
Block a user