Coverage Report

Created: 2025-06-10 13:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/bitcoin/src/script/script.h
Line
Count
Source
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
// Copyright (c) 2009-present The Bitcoin Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#ifndef BITCOIN_SCRIPT_SCRIPT_H
7
#define BITCOIN_SCRIPT_SCRIPT_H
8
9
#include <attributes.h>
10
#include <crypto/common.h>
11
#include <prevector.h> // IWYU pragma: export
12
#include <serialize.h>
13
#include <uint256.h>
14
#include <util/hash_type.h>
15
16
#include <cassert>
17
#include <cstdint>
18
#include <cstring>
19
#include <limits>
20
#include <span>
21
#include <stdexcept>
22
#include <string>
23
#include <type_traits>
24
#include <utility>
25
#include <vector>
26
27
// Maximum number of bytes pushable to the stack
28
static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520;
29
30
// Maximum number of non-push operations per script
31
static const int MAX_OPS_PER_SCRIPT = 201;
32
33
// Maximum number of public keys per multisig
34
static const int MAX_PUBKEYS_PER_MULTISIG = 20;
35
36
/** The limit of keys in OP_CHECKSIGADD-based scripts. It is due to the stack limit in BIP342. */
37
static constexpr unsigned int MAX_PUBKEYS_PER_MULTI_A = 999;
38
39
// Maximum script length in bytes
40
static const int MAX_SCRIPT_SIZE = 10000;
41
42
// Maximum number of values on script interpreter stack
43
static const int MAX_STACK_SIZE = 1000;
44
45
// Threshold for nLockTime: below this value it is interpreted as block number,
46
// otherwise as UNIX timestamp.
47
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
48
49
// Maximum nLockTime. Since a lock time indicates the last invalid timestamp, a
50
// transaction with this lock time will never be valid unless lock time
51
// checking is disabled (by setting all input sequence numbers to
52
// SEQUENCE_FINAL).
53
static const uint32_t LOCKTIME_MAX = 0xFFFFFFFFU;
54
55
// Tag for input annex. If there are at least two witness elements for a transaction input,
56
// and the first byte of the last element is 0x50, this last element is called annex, and
57
// has meanings independent of the script
58
static constexpr unsigned int ANNEX_TAG = 0x50;
59
60
// Validation weight per passing signature (Tapscript only, see BIP 342).
61
static constexpr int64_t VALIDATION_WEIGHT_PER_SIGOP_PASSED{50};
62
63
// How much weight budget is added to the witness size (Tapscript only, see BIP 342).
64
static constexpr int64_t VALIDATION_WEIGHT_OFFSET{50};
65
66
template <typename T>
67
std::vector<unsigned char> ToByteVector(const T& in)
68
1.10M
{
69
1.10M
    return std::vector<unsigned char>(in.begin(), in.end());
70
1.10M
}
Unexecuted instantiation: std::vector<unsigned char, std::allocator<unsigned char> > ToByteVector<XOnlyPubKey>(XOnlyPubKey const&)
Unexecuted instantiation: std::vector<unsigned char, std::allocator<unsigned char> > ToByteVector<CPubKey>(CPubKey const&)
std::vector<unsigned char, std::allocator<unsigned char> > ToByteVector<PKHash>(PKHash const&)
Line
Count
Source
68
221k
{
69
221k
    return std::vector<unsigned char>(in.begin(), in.end());
70
221k
}
std::vector<unsigned char, std::allocator<unsigned char> > ToByteVector<ScriptHash>(ScriptHash const&)
Line
Count
Source
68
221k
{
69
221k
    return std::vector<unsigned char>(in.begin(), in.end());
70
221k
}
Unexecuted instantiation: std::vector<unsigned char, std::allocator<unsigned char> > ToByteVector<WitnessV0ScriptHash>(WitnessV0ScriptHash const&)
std::vector<unsigned char, std::allocator<unsigned char> > ToByteVector<WitnessV0KeyHash>(WitnessV0KeyHash const&)
Line
Count
Source
68
443k
{
69
443k
    return std::vector<unsigned char>(in.begin(), in.end());
70
443k
}
std::vector<unsigned char, std::allocator<unsigned char> > ToByteVector<WitnessV1Taproot>(WitnessV1Taproot const&)
Line
Count
Source
68
221k
{
69
221k
    return std::vector<unsigned char>(in.begin(), in.end());
70
221k
}
Unexecuted instantiation: std::vector<unsigned char, std::allocator<unsigned char> > ToByteVector<std::vector<unsigned char, std::allocator<unsigned char> > >(std::vector<unsigned char, std::allocator<unsigned char> > const&)
71
72
/** Script opcodes */
73
enum opcodetype
74
{
75
    // push value
76
    OP_0 = 0x00,
77
    OP_FALSE = OP_0,
78
    OP_PUSHDATA1 = 0x4c,
79
    OP_PUSHDATA2 = 0x4d,
80
    OP_PUSHDATA4 = 0x4e,
81
    OP_1NEGATE = 0x4f,
82
    OP_RESERVED = 0x50,
83
    OP_1 = 0x51,
84
    OP_TRUE=OP_1,
85
    OP_2 = 0x52,
86
    OP_3 = 0x53,
87
    OP_4 = 0x54,
88
    OP_5 = 0x55,
89
    OP_6 = 0x56,
90
    OP_7 = 0x57,
91
    OP_8 = 0x58,
92
    OP_9 = 0x59,
93
    OP_10 = 0x5a,
94
    OP_11 = 0x5b,
95
    OP_12 = 0x5c,
96
    OP_13 = 0x5d,
97
    OP_14 = 0x5e,
98
    OP_15 = 0x5f,
99
    OP_16 = 0x60,
100
101
    // control
102
    OP_NOP = 0x61,
103
    OP_VER = 0x62,
104
    OP_IF = 0x63,
105
    OP_NOTIF = 0x64,
106
    OP_VERIF = 0x65,
107
    OP_VERNOTIF = 0x66,
108
    OP_ELSE = 0x67,
109
    OP_ENDIF = 0x68,
110
    OP_VERIFY = 0x69,
111
    OP_RETURN = 0x6a,
112
113
    // stack ops
114
    OP_TOALTSTACK = 0x6b,
115
    OP_FROMALTSTACK = 0x6c,
116
    OP_2DROP = 0x6d,
117
    OP_2DUP = 0x6e,
118
    OP_3DUP = 0x6f,
119
    OP_2OVER = 0x70,
120
    OP_2ROT = 0x71,
121
    OP_2SWAP = 0x72,
122
    OP_IFDUP = 0x73,
123
    OP_DEPTH = 0x74,
124
    OP_DROP = 0x75,
125
    OP_DUP = 0x76,
126
    OP_NIP = 0x77,
127
    OP_OVER = 0x78,
128
    OP_PICK = 0x79,
129
    OP_ROLL = 0x7a,
130
    OP_ROT = 0x7b,
131
    OP_SWAP = 0x7c,
132
    OP_TUCK = 0x7d,
133
134
    // splice ops
135
    OP_CAT = 0x7e,
136
    OP_SUBSTR = 0x7f,
137
    OP_LEFT = 0x80,
138
    OP_RIGHT = 0x81,
139
    OP_SIZE = 0x82,
140
141
    // bit logic
142
    OP_INVERT = 0x83,
143
    OP_AND = 0x84,
144
    OP_OR = 0x85,
145
    OP_XOR = 0x86,
146
    OP_EQUAL = 0x87,
147
    OP_EQUALVERIFY = 0x88,
148
    OP_RESERVED1 = 0x89,
149
    OP_RESERVED2 = 0x8a,
150
151
    // numeric
152
    OP_1ADD = 0x8b,
153
    OP_1SUB = 0x8c,
154
    OP_2MUL = 0x8d,
155
    OP_2DIV = 0x8e,
156
    OP_NEGATE = 0x8f,
157
    OP_ABS = 0x90,
158
    OP_NOT = 0x91,
159
    OP_0NOTEQUAL = 0x92,
160
161
    OP_ADD = 0x93,
162
    OP_SUB = 0x94,
163
    OP_MUL = 0x95,
164
    OP_DIV = 0x96,
165
    OP_MOD = 0x97,
166
    OP_LSHIFT = 0x98,
167
    OP_RSHIFT = 0x99,
168
169
    OP_BOOLAND = 0x9a,
170
    OP_BOOLOR = 0x9b,
171
    OP_NUMEQUAL = 0x9c,
172
    OP_NUMEQUALVERIFY = 0x9d,
173
    OP_NUMNOTEQUAL = 0x9e,
174
    OP_LESSTHAN = 0x9f,
175
    OP_GREATERTHAN = 0xa0,
176
    OP_LESSTHANOREQUAL = 0xa1,
177
    OP_GREATERTHANOREQUAL = 0xa2,
178
    OP_MIN = 0xa3,
179
    OP_MAX = 0xa4,
180
181
    OP_WITHIN = 0xa5,
182
183
    // crypto
184
    OP_RIPEMD160 = 0xa6,
185
    OP_SHA1 = 0xa7,
186
    OP_SHA256 = 0xa8,
187
    OP_HASH160 = 0xa9,
188
    OP_HASH256 = 0xaa,
189
    OP_CODESEPARATOR = 0xab,
190
    OP_CHECKSIG = 0xac,
191
    OP_CHECKSIGVERIFY = 0xad,
192
    OP_CHECKMULTISIG = 0xae,
193
    OP_CHECKMULTISIGVERIFY = 0xaf,
194
195
    // expansion
196
    OP_NOP1 = 0xb0,
197
    OP_CHECKLOCKTIMEVERIFY = 0xb1,
198
    OP_NOP2 = OP_CHECKLOCKTIMEVERIFY,
199
    OP_CHECKSEQUENCEVERIFY = 0xb2,
200
    OP_NOP3 = OP_CHECKSEQUENCEVERIFY,
201
    OP_NOP4 = 0xb3,
202
    OP_NOP5 = 0xb4,
203
    OP_NOP6 = 0xb5,
204
    OP_NOP7 = 0xb6,
205
    OP_NOP8 = 0xb7,
206
    OP_NOP9 = 0xb8,
207
    OP_NOP10 = 0xb9,
208
209
    // Opcode added by BIP 342 (Tapscript)
210
    OP_CHECKSIGADD = 0xba,
211
212
    OP_INVALIDOPCODE = 0xff,
213
};
214
215
// Maximum value that an opcode can be
216
static const unsigned int MAX_OPCODE = OP_NOP10;
217
218
std::string GetOpName(opcodetype opcode);
219
220
class scriptnum_error : public std::runtime_error
221
{
222
public:
223
869
    explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {}
224
};
225
226
class CScriptNum
227
{
228
/**
229
 * Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers.
230
 * The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1],
231
 * but results may overflow (and are valid as long as they are not used in a subsequent
232
 * numeric operation). CScriptNum enforces those semantics by storing results as
233
 * an int64 and allowing out-of-range values to be returned as a vector of bytes but
234
 * throwing an exception if arithmetic is done or the result is interpreted as an integer.
235
 */
236
public:
237
238
    explicit CScriptNum(const int64_t& n)
239
208k
    {
240
208k
        m_value = n;
241
208k
    }
242
243
    static const size_t nDefaultMaxNumSize = 4;
244
245
    explicit CScriptNum(const std::vector<unsigned char>& vch, bool fRequireMinimal,
246
                        const size_t nMaxNumSize = nDefaultMaxNumSize)
247
22.1k
    {
248
22.1k
        if (vch.size() > nMaxNumSize) {
  Branch (248:13): [True: 735, False: 21.3k]
249
735
            throw scriptnum_error("script number overflow");
250
735
        }
251
21.3k
        if (fRequireMinimal && vch.size() > 0) {
  Branch (251:13): [True: 10.7k, False: 10.5k]
  Branch (251:32): [True: 7.11k, False: 3.68k]
252
            // Check that the number is encoded with the minimum possible
253
            // number of bytes.
254
            //
255
            // If the most-significant-byte - excluding the sign bit - is zero
256
            // then we're not minimal. Note how this test also rejects the
257
            // negative-zero encoding, 0x80.
258
7.11k
            if ((vch.back() & 0x7f) == 0) {
  Branch (258:17): [True: 831, False: 6.27k]
259
                // One exception: if there's more than one byte and the most
260
                // significant bit of the second-most-significant-byte is set
261
                // it would conflict with the sign bit. An example of this case
262
                // is +-255, which encode to 0xff00 and 0xff80 respectively.
263
                // (big-endian).
264
831
                if (vch.size() <= 1 || (vch[vch.size() - 2] & 0x80) == 0) {
  Branch (264:21): [True: 32, False: 799]
  Branch (264:40): [True: 102, False: 697]
265
134
                    throw scriptnum_error("non-minimally encoded script number");
266
134
                }
267
831
            }
268
7.11k
        }
269
21.2k
        m_value = set_vch(vch);
270
21.2k
    }
271
272
1.16k
    inline bool operator==(const int64_t& rhs) const    { return m_value == rhs; }
273
4.69k
    inline bool operator!=(const int64_t& rhs) const    { return m_value != rhs; }
274
434
    inline bool operator<=(const int64_t& rhs) const    { return m_value <= rhs; }
275
2.47k
    inline bool operator< (const int64_t& rhs) const    { return m_value <  rhs; }
276
168
    inline bool operator>=(const int64_t& rhs) const    { return m_value >= rhs; }
277
512
    inline bool operator> (const int64_t& rhs) const    { return m_value >  rhs; }
278
279
1.16k
    inline bool operator==(const CScriptNum& rhs) const { return operator==(rhs.m_value); }
280
4.32k
    inline bool operator!=(const CScriptNum& rhs) const { return operator!=(rhs.m_value); }
281
434
    inline bool operator<=(const CScriptNum& rhs) const { return operator<=(rhs.m_value); }
282
1.67k
    inline bool operator< (const CScriptNum& rhs) const { return operator< (rhs.m_value); }
283
144
    inline bool operator>=(const CScriptNum& rhs) const { return operator>=(rhs.m_value); }
284
353
    inline bool operator> (const CScriptNum& rhs) const { return operator> (rhs.m_value); }
285
286
226
    inline CScriptNum operator+(   const int64_t& rhs)    const { return CScriptNum(m_value + rhs);}
287
456
    inline CScriptNum operator-(   const int64_t& rhs)    const { return CScriptNum(m_value - rhs);}
288
226
    inline CScriptNum operator+(   const CScriptNum& rhs) const { return operator+(rhs.m_value);   }
289
456
    inline CScriptNum operator-(   const CScriptNum& rhs) const { return operator-(rhs.m_value);   }
290
291
737
    inline CScriptNum& operator+=( const CScriptNum& rhs)       { return operator+=(rhs.m_value);  }
292
1.34k
    inline CScriptNum& operator-=( const CScriptNum& rhs)       { return operator-=(rhs.m_value);  }
293
294
375
    inline CScriptNum operator&(   const int64_t& rhs)    const { return CScriptNum(m_value & rhs);}
295
0
    inline CScriptNum operator&(   const CScriptNum& rhs) const { return operator&(rhs.m_value);   }
296
297
0
    inline CScriptNum& operator&=( const CScriptNum& rhs)       { return operator&=(rhs.m_value);  }
298
299
    inline CScriptNum operator-()                         const
300
657
    {
301
657
        assert(m_value != std::numeric_limits<int64_t>::min());
  Branch (301:9): [True: 657, False: 0]
302
657
        return CScriptNum(-m_value);
303
657
    }
304
305
    inline CScriptNum& operator=( const int64_t& rhs)
306
5.82k
    {
307
5.82k
        m_value = rhs;
308
5.82k
        return *this;
309
5.82k
    }
310
311
    inline CScriptNum& operator+=( const int64_t& rhs)
312
737
    {
313
737
        assert(rhs == 0 || (rhs > 0 && m_value <= std::numeric_limits<int64_t>::max() - rhs) ||
  Branch (313:9): [True: 737, False: 0]
  Branch (313:9): [True: 737, False: 0]
  Branch (313:9): [True: 0, False: 737]
  Branch (313:9): [True: 0, False: 0]
  Branch (313:9): [True: 0, False: 0]
  Branch (313:9): [True: 737, False: 0]
314
737
                           (rhs < 0 && m_value >= std::numeric_limits<int64_t>::min() - rhs));
315
737
        m_value += rhs;
316
737
        return *this;
317
737
    }
318
319
    inline CScriptNum& operator-=( const int64_t& rhs)
320
1.34k
    {
321
1.34k
        assert(rhs == 0 || (rhs > 0 && m_value >= std::numeric_limits<int64_t>::min() + rhs) ||
  Branch (321:9): [True: 1.34k, False: 0]
  Branch (321:9): [True: 1.34k, False: 0]
  Branch (321:9): [True: 0, False: 1.34k]
  Branch (321:9): [True: 0, False: 0]
  Branch (321:9): [True: 0, False: 0]
  Branch (321:9): [True: 1.34k, False: 0]
322
1.34k
                           (rhs < 0 && m_value <= std::numeric_limits<int64_t>::max() + rhs));
323
1.34k
        m_value -= rhs;
324
1.34k
        return *this;
325
1.34k
    }
326
327
    inline CScriptNum& operator&=( const int64_t& rhs)
328
0
    {
329
0
        m_value &= rhs;
330
0
        return *this;
331
0
    }
332
333
    int getint() const
334
3.23k
    {
335
3.23k
        if (m_value > std::numeric_limits<int>::max())
  Branch (335:13): [True: 0, False: 3.23k]
336
0
            return std::numeric_limits<int>::max();
337
3.23k
        else if (m_value < std::numeric_limits<int>::min())
  Branch (337:18): [True: 0, False: 3.23k]
338
0
            return std::numeric_limits<int>::min();
339
3.23k
        return m_value;
340
3.23k
    }
341
342
0
    int64_t GetInt64() const { return m_value; }
343
344
    std::vector<unsigned char> getvch() const
345
198k
    {
346
198k
        return serialize(m_value);
347
198k
    }
348
349
    static std::vector<unsigned char> serialize(const int64_t& value)
350
2.31M
    {
351
2.31M
        if(value == 0)
  Branch (351:12): [True: 2.16k, False: 2.31M]
352
2.16k
            return std::vector<unsigned char>();
353
354
2.31M
        std::vector<unsigned char> result;
355
2.31M
        const bool neg = value < 0;
356
2.31M
        uint64_t absvalue = neg ? ~static_cast<uint64_t>(value) + 1 : static_cast<uint64_t>(value);
  Branch (356:29): [True: 2.06k, False: 2.31M]
357
358
4.83M
        while(absvalue)
  Branch (358:15): [True: 2.52M, False: 2.31M]
359
2.52M
        {
360
2.52M
            result.push_back(absvalue & 0xff);
361
2.52M
            absvalue >>= 8;
362
2.52M
        }
363
364
//    - If the most significant byte is >= 0x80 and the value is positive, push a
365
//    new zero-byte to make the significant byte < 0x80 again.
366
367
//    - If the most significant byte is >= 0x80 and the value is negative, push a
368
//    new 0x80 byte that will be popped off when converting to an integral.
369
370
//    - If the most significant byte is < 0x80 and the value is negative, add
371
//    0x80 to it, since it will be subtracted and interpreted as a negative when
372
//    converting to an integral.
373
374
2.31M
        if (result.back() & 0x80)
  Branch (374:13): [True: 822k, False: 1.49M]
375
822k
            result.push_back(neg ? 0x80 : 0);
  Branch (375:30): [True: 36, False: 822k]
376
1.49M
        else if (neg)
  Branch (376:18): [True: 2.02k, False: 1.49M]
377
2.02k
            result.back() |= 0x80;
378
379
2.31M
        return result;
380
2.31M
    }
381
382
private:
383
    static int64_t set_vch(const std::vector<unsigned char>& vch)
384
21.2k
    {
385
21.2k
      if (vch.empty())
  Branch (385:11): [True: 7.50k, False: 13.7k]
386
7.50k
          return 0;
387
388
13.7k
      int64_t result = 0;
389
40.7k
      for (size_t i = 0; i != vch.size(); ++i)
  Branch (389:26): [True: 27.0k, False: 13.7k]
390
27.0k
          result |= static_cast<int64_t>(vch[i]) << 8*i;
391
392
      // If the input vector's most significant byte is 0x80, remove it from
393
      // the result's msb and return a negative.
394
13.7k
      if (vch.back() & 0x80)
  Branch (394:11): [True: 4.36k, False: 9.36k]
395
4.36k
          return -((int64_t)(result & ~(0x80ULL << (8 * (vch.size() - 1)))));
396
397
9.36k
      return result;
398
13.7k
    }
399
400
    int64_t m_value;
401
};
402
403
/**
404
 * We use a prevector for the script to reduce the considerable memory overhead
405
 *  of vectors in cases where they normally contain a small number of small elements.
406
 * Tests in October 2015 showed use of this reduced dbcache memory usage by 23%
407
 *  and made an initial sync 13% faster.
408
 */
409
typedef prevector<28, unsigned char> CScriptBase;
410
411
bool GetScriptOp(CScriptBase::const_iterator& pc, CScriptBase::const_iterator end, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet);
412
413
/** Serialized script, used inside transaction inputs and outputs */
414
class CScript : public CScriptBase
415
{
416
private:
417
    inline void AppendDataSize(const uint32_t size)
418
3.43M
    {
419
3.43M
        if (size < OP_PUSHDATA1) {
  Branch (419:13): [True: 3.41M, False: 11.1k]
420
3.41M
            insert(end(), static_cast<value_type>(size));
421
3.41M
        } else if (size <= 0xff) {
  Branch (421:20): [True: 11.1k, False: 56]
422
11.1k
            insert(end(), OP_PUSHDATA1);
423
11.1k
            insert(end(), static_cast<value_type>(size));
424
11.1k
        } else if (size <= 0xffff) {
  Branch (424:20): [True: 56, False: 0]
425
56
            insert(end(), OP_PUSHDATA2);
426
56
            value_type data[2];
427
56
            WriteLE16(data, size);
428
56
            insert(end(), std::cbegin(data), std::cend(data));
429
56
        } else {
430
0
            insert(end(), OP_PUSHDATA4);
431
0
            value_type data[4];
432
0
            WriteLE32(data, size);
433
0
            insert(end(), std::cbegin(data), std::cend(data));
434
0
        }
435
3.43M
    }
436
437
    void AppendData(std::span<const value_type> data)
438
3.43M
    {
439
3.43M
        insert(end(), data.begin(), data.end());
440
3.43M
    }
441
442
protected:
443
    CScript& push_int64(int64_t n)
444
2.29M
    {
445
2.29M
        if (n == -1 || (n >= 1 && n <= 16))
  Branch (445:13): [True: 0, False: 2.29M]
  Branch (445:25): [True: 2.29M, False: 0]
  Branch (445:35): [True: 177k, False: 2.11M]
446
177k
        {
447
177k
            push_back(n + (OP_1 - 1));
448
177k
        }
449
2.11M
        else if (n == 0)
  Branch (449:18): [True: 0, False: 2.11M]
450
0
        {
451
0
            push_back(OP_0);
452
0
        }
453
2.11M
        else
454
2.11M
        {
455
2.11M
            *this << CScriptNum::serialize(n);
456
2.11M
        }
457
2.29M
        return *this;
458
2.29M
    }
459
460
public:
461
38.5M
    CScript() = default;
462
    template <std::input_iterator InputIterator>
463
207k
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
_ZN7CScriptC2ITkSt14input_iteratorN9__gnu_cxx17__normal_iteratorIPhSt6vectorIhSaIhEEEEEET_S8_
Line
Count
Source
463
12.7k
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
_ZN7CScriptC2ITkSt14input_iteratorN9__gnu_cxx17__normal_iteratorIPKhSt6vectorIhSaIhEEEEEET_S9_
Line
Count
Source
463
193k
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
Unexecuted instantiation: _ZN7CScriptC2ITkSt14input_iteratorN9__gnu_cxx17__normal_iteratorIPKhSt4spanIS3_Lm18446744073709551615EEEEEET_S8_
_ZN7CScriptC2ITkSt14input_iteratorN9prevectorILj28EhjiE14const_iteratorEEET_S4_
Line
Count
Source
463
1.61k
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
464
465
74.6M
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<SizeComputer&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<SizeComputer&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
465
42.1M
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<VectorWriter&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<VectorWriter&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
465
27.4k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<DataStream&, TransactionSerParams>, CScript, ActionUnserialize>(CScript&, ParamsStream<DataStream&, TransactionSerParams>&, ActionUnserialize)
Line
Count
Source
465
8.14M
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<SpanReader&, TransactionSerParams>, CScript, ActionUnserialize>(CScript&, ParamsStream<SpanReader&, TransactionSerParams>&, ActionUnserialize)
Line
Count
Source
465
151k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<BufferedWriter<AutoFile>&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<BufferedWriter<AutoFile>&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
465
6.92M
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
Unexecuted instantiation: void CScript::SerializationOps<ParamsStream<AutoFile&, TransactionSerParams>, CScript, ActionUnserialize>(CScript&, ParamsStream<AutoFile&, TransactionSerParams>&, ActionUnserialize)
void CScript::SerializationOps<ParamsStream<AutoFile&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<AutoFile&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
465
59.5k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
Unexecuted instantiation: void CScript::SerializationOps<ParamsStream<DataStream&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<DataStream&, TransactionSerParams>&, ActionSerialize)
Unexecuted instantiation: void CScript::SerializationOps<DataStream, CScript const, ActionSerialize>(CScript const&, DataStream&, ActionSerialize)
void CScript::SerializationOps<SizeComputer, CScript const, ActionSerialize>(CScript const&, SizeComputer&, ActionSerialize)
Line
Count
Source
465
521k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
Unexecuted instantiation: void CScript::SerializationOps<SpanReader, CScript, ActionUnserialize>(CScript&, SpanReader&, ActionUnserialize)
Unexecuted instantiation: void CScript::SerializationOps<ParamsStream<BufferedFile&, TransactionSerParams>, CScript, ActionUnserialize>(CScript&, ParamsStream<BufferedFile&, TransactionSerParams>&, ActionUnserialize)
void CScript::SerializationOps<HashWriter, CScript const, ActionSerialize>(CScript const&, HashWriter&, ActionSerialize)
Line
Count
Source
465
67.1k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
Unexecuted instantiation: void CScript::SerializationOps<DataStream, CScript, ActionUnserialize>(CScript&, DataStream&, ActionUnserialize)
void CScript::SerializationOps<ParamsStream<HashWriter&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<HashWriter&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
465
16.5M
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
466
467
0
    explicit CScript(int64_t b) { operator<<(b); }
468
0
    explicit CScript(opcodetype b)     { operator<<(b); }
469
0
    explicit CScript(const CScriptNum& b) { operator<<(b); }
470
    // delete non-existent constructor to defend against future introduction
471
    // e.g. via prevector
472
    explicit CScript(const std::vector<unsigned char>& b) = delete;
473
474
    /** Delete non-existent operator to defend against future introduction */
475
    CScript& operator<<(const CScript& b) = delete;
476
477
2.29M
    CScript& operator<<(int64_t b) LIFETIMEBOUND { return push_int64(b); }
478
479
    CScript& operator<<(opcodetype opcode) LIFETIMEBOUND
480
2.06M
    {
481
2.06M
        if (opcode < 0 || opcode > 0xff)
  Branch (481:13): [True: 0, False: 2.06M]
  Branch (481:27): [True: 0, False: 2.06M]
482
0
            throw std::runtime_error("CScript::operator<<(): invalid opcode");
483
2.06M
        insert(end(), (unsigned char)opcode);
484
2.06M
        return *this;
485
2.06M
    }
486
487
    CScript& operator<<(const CScriptNum& b) LIFETIMEBOUND
488
66.5k
    {
489
66.5k
        *this << b.getvch();
490
66.5k
        return *this;
491
66.5k
    }
492
493
    CScript& operator<<(std::span<const std::byte> b) LIFETIMEBOUND
494
3.43M
    {
495
3.43M
        AppendDataSize(b.size());
496
3.43M
        AppendData({reinterpret_cast<const value_type*>(b.data()), b.size()});
497
3.43M
        return *this;
498
3.43M
    }
499
500
    // For compatibility reasons. In new code, prefer using std::byte instead of uint8_t.
501
    CScript& operator<<(std::span<const value_type> b) LIFETIMEBOUND
502
3.36M
    {
503
3.36M
        return *this << std::as_bytes(b);
504
3.36M
    }
505
506
    bool GetOp(const_iterator& pc, opcodetype& opcodeRet, std::vector<unsigned char>& vchRet) const
507
536k
    {
508
536k
        return GetScriptOp(pc, end(), opcodeRet, &vchRet);
509
536k
    }
510
511
    bool GetOp(const_iterator& pc, opcodetype& opcodeRet) const
512
28.0M
    {
513
28.0M
        return GetScriptOp(pc, end(), opcodeRet, nullptr);
514
28.0M
    }
515
516
    /** Encode/decode small integers: */
517
    static int DecodeOP_N(opcodetype opcode)
518
1.21M
    {
519
1.21M
        if (opcode == OP_0)
  Branch (519:13): [True: 1.11M, False: 94.1k]
520
1.11M
            return 0;
521
1.21M
        assert(opcode >= OP_1 && opcode <= OP_16);
  Branch (521:9): [True: 94.1k, False: 18.4E]
  Branch (521:9): [True: 94.1k, False: 0]
  Branch (521:9): [True: 94.1k, False: 18.4E]
522
94.1k
        return (int)opcode - (int)(OP_1 - 1);
523
94.1k
    }
524
    static opcodetype EncodeOP_N(int n)
525
0
    {
526
0
        assert(n >= 0 && n <= 16);
  Branch (526:9): [True: 0, False: 0]
  Branch (526:9): [True: 0, False: 0]
  Branch (526:9): [True: 0, False: 0]
527
0
        if (n == 0)
  Branch (527:13): [True: 0, False: 0]
528
0
            return OP_0;
529
0
        return (opcodetype)(OP_1+n-1);
530
0
    }
531
532
    /**
533
     * Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs
534
     * as 20 sigops. With pay-to-script-hash, that changed:
535
     * CHECKMULTISIGs serialized in scriptSigs are
536
     * counted more accurately, assuming they are of the form
537
     *  ... OP_N CHECKMULTISIG ...
538
     */
539
    unsigned int GetSigOpCount(bool fAccurate) const;
540
541
    /**
542
     * Accurately count sigOps, including sigOps in
543
     * pay-to-script-hash transactions:
544
     */
545
    unsigned int GetSigOpCount(const CScript& scriptSig) const;
546
547
    /*
548
     * OP_1 <0x4e73>
549
     */
550
    bool IsPayToAnchor() const;
551
    /** Checks if output of IsWitnessProgram comes from a P2A output script
552
     */
553
    static bool IsPayToAnchor(int version, const std::vector<unsigned char>& program);
554
555
    bool IsPayToScriptHash() const;
556
    bool IsPayToWitnessScriptHash() const;
557
    bool IsWitnessProgram(int& version, std::vector<unsigned char>& program) const;
558
559
    bool IsPayToTaproot() const;
560
561
    /** Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical). */
562
    bool IsPushOnly(const_iterator pc) const;
563
    bool IsPushOnly() const;
564
565
    /** Check if the script contains valid OP_CODES */
566
    bool HasValidOps() const;
567
568
    /**
569
     * Returns whether the script is guaranteed to fail at execution,
570
     * regardless of the initial stack. This allows outputs to be pruned
571
     * instantly when entering the UTXO set.
572
     */
573
    bool IsUnspendable() const
574
6.69M
    {
575
6.69M
        return (size() > 0 && *begin() == OP_RETURN) || (size() > MAX_SCRIPT_SIZE);
  Branch (575:17): [True: 6.68M, False: 10.3k]
  Branch (575:31): [True: 2.40M, False: 4.27M]
  Branch (575:57): [True: 0, False: 4.28M]
576
6.69M
    }
577
578
    void clear()
579
32.2M
    {
580
        // The default prevector::clear() does not release memory
581
32.2M
        CScriptBase::clear();
582
32.2M
        shrink_to_fit();
583
32.2M
    }
584
};
585
586
struct CScriptWitness
587
{
588
    // Note that this encodes the data elements being pushed, rather than
589
    // encoding them as a CScript that pushes them.
590
    std::vector<std::vector<unsigned char> > stack;
591
592
    // Some compilers complain without a default constructor
593
3.09M
    CScriptWitness() = default;
594
595
6.00M
    bool IsNull() const { return stack.empty(); }
596
597
0
    void SetNull() { stack.clear(); stack.shrink_to_fit(); }
598
599
    std::string ToString() const;
600
};
601
602
/** A reference to a CScript: the Hash160 of its serialization */
603
class CScriptID : public BaseHash<uint160>
604
{
605
public:
606
2.26M
    CScriptID() : BaseHash() {}
607
    explicit CScriptID(const CScript& in);
608
0
    explicit CScriptID(const uint160& in) : BaseHash(in) {}
609
};
610
611
/** Test for OP_SUCCESSx opcodes as defined by BIP342. */
612
bool IsOpSuccess(const opcodetype& opcode);
613
614
bool CheckMinimalPush(const std::vector<unsigned char>& data, opcodetype opcode);
615
616
/** Build a script by concatenating other scripts, or any argument accepted by CScript::operator<<. */
617
template<typename... Ts>
618
CScript BuildScript(Ts&&... inputs)
619
0
{
620
0
    CScript ret;
621
0
    int cnt{0};
622
623
0
    ([&ret, &cnt] (Ts&& input) {
624
0
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
625
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
626
0
            if (cnt == 0) {
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
  Branch (626:17): [True: 0, False: 0]
627
0
                ret = std::forward<Ts>(input);
628
0
            } else {
629
0
                ret.insert(ret.end(), input.begin(), input.end());
630
0
            }
631
0
        } else {
632
            // Otherwise invoke CScript::operator<<.
633
0
            ret << input;
634
0
        }
635
0
        cnt++;
636
0
    } (std::forward<Ts>(inputs)), ...);
Unexecuted instantiation: BuildScript<unsigned long const&>(unsigned long const&)::{lambda(unsigned long const&)#1}::operator()(unsigned long const&) const
Unexecuted instantiation: BuildScript<int const&>(int const&)::{lambda(int const&)#1}::operator()(int const&) const
Unexecuted instantiation: BuildScript<long const&>(long const&)::{lambda(long const&)#1}::operator()(long const&) const
Unexecuted instantiation: BuildScript<std::vector<unsigned char, std::allocator<unsigned char> > >(std::vector<unsigned char, std::allocator<unsigned char> >&&)::{lambda(std::vector<unsigned char, std::allocator<unsigned char> >&&)#1}::operator()(std::vector<unsigned char, std::allocator<unsigned char> >&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)::{lambda(opcodetype&&)#3}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)::{lambda(opcodetype&&)#2}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)::{lambda(std::vector<unsigned char, std::allocator<unsigned char> >&&)#1}::operator()(std::vector<unsigned char, std::allocator<unsigned char> >&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<unsigned int const&, opcodetype>(unsigned int const&, opcodetype&&)::{lambda(unsigned int const&)#1}::operator()(unsigned int const&) const
Unexecuted instantiation: BuildScript<unsigned int const&, opcodetype>(unsigned int const&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype&&)::{lambda(opcodetype&&)#4}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype&&)::{lambda(int&&)#1}::operator()(int&&) const
Unexecuted instantiation: BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype&&)::{lambda(opcodetype&&)#3}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype&&)::{lambda(opcodetype&&)#2}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype&&)::{lambda(std::vector<unsigned char, std::allocator<unsigned char> > const&)#1}::operator()(std::vector<unsigned char, std::allocator<unsigned char> > const&) const
Unexecuted instantiation: BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#2}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&)#1}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, CScript&>(opcodetype&&, CScript&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, CScript&>(opcodetype&&, CScript&)::{lambda(CScript&)#1}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype>(CScript&&, opcodetype&&)::{lambda(CScript&&)#1}::operator()(CScript&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype>(CScript&&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#3}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#2}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&)#1}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#4}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#3}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#2}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&)#1}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype>(opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, CScript&>(CScript&&, CScript&)::{lambda(CScript&&)#1}::operator()(CScript&&) const
Unexecuted instantiation: BuildScript<CScript, CScript&>(CScript&&, CScript&)::{lambda(CScript&)#1}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<CScript, CScript&, opcodetype>(CScript&&, CScript&, opcodetype&&)::{lambda(CScript&&)#1}::operator()(CScript&&) const
Unexecuted instantiation: BuildScript<CScript, CScript&, opcodetype>(CScript&&, CScript&, opcodetype&&)::{lambda(CScript&)#1}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<CScript, CScript&, opcodetype>(CScript&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&&)#1}::operator()(CScript&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#3}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#2}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&)#1}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&&)#1}::operator()(CScript&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#2}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&)#1}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#3}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&)#2}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#2}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&)#1}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&&)#1}::operator()(CScript&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#3}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&)#2}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#2}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(CScript&)#1}::operator()(CScript&) const
Unexecuted instantiation: BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<unsigned int const&>(unsigned int const&)::{lambda(unsigned int const&)#1}::operator()(unsigned int const&) const
Unexecuted instantiation: BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char> > >(CScript&&, std::vector<unsigned char, std::allocator<unsigned char> >&&)::{lambda(CScript&&)#1}::operator()(CScript&&) const
Unexecuted instantiation: BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char> > >(CScript&&, std::vector<unsigned char, std::allocator<unsigned char> >&&)::{lambda(std::vector<unsigned char, std::allocator<unsigned char> >&&)#1}::operator()(std::vector<unsigned char, std::allocator<unsigned char> >&&) const
Unexecuted instantiation: BuildScript<CScript, unsigned long, opcodetype>(CScript&&, unsigned long&&, opcodetype&&)::{lambda(CScript&&)#1}::operator()(CScript&&) const
Unexecuted instantiation: BuildScript<CScript, unsigned long, opcodetype>(CScript&&, unsigned long&&, opcodetype&&)::{lambda(unsigned long&&)#1}::operator()(unsigned long&&) const
Unexecuted instantiation: BuildScript<CScript, unsigned long, opcodetype>(CScript&&, unsigned long&&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)::{lambda(std::vector<unsigned char, std::allocator<unsigned char> >&&)#1}::operator()(std::vector<unsigned char, std::allocator<unsigned char> >&&) const
Unexecuted instantiation: BuildScript<std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)::{lambda(CScript&&)#1}::operator()(CScript&&) const
Unexecuted instantiation: BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)::{lambda(std::vector<unsigned char, std::allocator<unsigned char> >&&)#1}::operator()(std::vector<unsigned char, std::allocator<unsigned char> >&&) const
Unexecuted instantiation: BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<CScript, unsigned int const&, opcodetype>(CScript&&, unsigned int const&, opcodetype&&)::{lambda(CScript&&)#1}::operator()(CScript&&) const
Unexecuted instantiation: BuildScript<CScript, unsigned int const&, opcodetype>(CScript&&, unsigned int const&, opcodetype&&)::{lambda(unsigned int const&)#1}::operator()(unsigned int const&) const
Unexecuted instantiation: BuildScript<CScript, unsigned int const&, opcodetype>(CScript&&, unsigned int const&, opcodetype&&)::{lambda(opcodetype&&)#1}::operator()(opcodetype&&) const
Unexecuted instantiation: BuildScript<unsigned int&>(unsigned int&)::{lambda(unsigned int&)#1}::operator()(unsigned int&) const
Unexecuted instantiation: BuildScript<unsigned long&>(unsigned long&)::{lambda(unsigned long&)#1}::operator()(unsigned long&) const
637
638
0
    return ret;
639
0
}
Unexecuted instantiation: CScript BuildScript<unsigned long const&>(unsigned long const&)
Unexecuted instantiation: CScript BuildScript<int const&>(int const&)
Unexecuted instantiation: CScript BuildScript<long const&>(long const&)
Unexecuted instantiation: CScript BuildScript<std::vector<unsigned char, std::allocator<unsigned char> > >(std::vector<unsigned char, std::allocator<unsigned char> >&&)
Unexecuted instantiation: CScript BuildScript<opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<unsigned int const&, opcodetype>(unsigned int const&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char> > const&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<opcodetype, CScript&>(opcodetype&&, CScript&)
Unexecuted instantiation: CScript BuildScript<CScript, opcodetype>(CScript&&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, CScript&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<opcodetype>(opcodetype&&)
Unexecuted instantiation: CScript BuildScript<CScript, CScript&>(CScript&&, CScript&)
Unexecuted instantiation: CScript BuildScript<CScript, CScript&, opcodetype>(CScript&&, CScript&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<CScript, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<unsigned int const&>(unsigned int const&)
Unexecuted instantiation: CScript BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char> > >(CScript&&, std::vector<unsigned char, std::allocator<unsigned char> >&&)
Unexecuted instantiation: CScript BuildScript<CScript, unsigned long, opcodetype>(CScript&&, unsigned long&&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char> >, opcodetype>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char> >&&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<CScript, unsigned int const&, opcodetype>(CScript&&, unsigned int const&, opcodetype&&)
Unexecuted instantiation: CScript BuildScript<unsigned int&>(unsigned int&)
Unexecuted instantiation: CScript BuildScript<unsigned long&>(unsigned long&)
640
641
#endif // BITCOIN_SCRIPT_SCRIPT_H