Bitcoin Core  0.18.99
P2P Digital Currency
script.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2018 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 <crypto/common.h>
10 #include <prevector.h>
11 #include <serialize.h>
12 
13 #include <assert.h>
14 #include <climits>
15 #include <limits>
16 #include <stdexcept>
17 #include <stdint.h>
18 #include <string.h>
19 #include <string>
20 #include <vector>
21 
22 // Maximum number of bytes pushable to the stack
23 static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520;
24 
25 // Maximum number of non-push operations per script
26 static const int MAX_OPS_PER_SCRIPT = 201;
27 
28 // Maximum number of public keys per multisig
29 static const int MAX_PUBKEYS_PER_MULTISIG = 20;
30 
31 // Maximum script length in bytes
32 static const int MAX_SCRIPT_SIZE = 10000;
33 
34 // Maximum number of values on script interpreter stack
35 static const int MAX_STACK_SIZE = 1000;
36 
37 // Threshold for nLockTime: below this value it is interpreted as block number,
38 // otherwise as UNIX timestamp.
39 static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC
40 
41 // Maximum nLockTime. Since a lock time indicates the last invalid timestamp, a
42 // transaction with this lock time will never be valid unless lock time
43 // checking is disabled (by setting all input sequence numbers to
44 // SEQUENCE_FINAL).
45 static const uint32_t LOCKTIME_MAX = 0xFFFFFFFFU;
46 
47 template <typename T>
48 std::vector<unsigned char> ToByteVector(const T& in)
49 {
50  return std::vector<unsigned char>(in.begin(), in.end());
51 }
52 
55 {
56  // push value
57  OP_0 = 0x00,
59  OP_PUSHDATA1 = 0x4c,
60  OP_PUSHDATA2 = 0x4d,
61  OP_PUSHDATA4 = 0x4e,
62  OP_1NEGATE = 0x4f,
63  OP_RESERVED = 0x50,
64  OP_1 = 0x51,
66  OP_2 = 0x52,
67  OP_3 = 0x53,
68  OP_4 = 0x54,
69  OP_5 = 0x55,
70  OP_6 = 0x56,
71  OP_7 = 0x57,
72  OP_8 = 0x58,
73  OP_9 = 0x59,
74  OP_10 = 0x5a,
75  OP_11 = 0x5b,
76  OP_12 = 0x5c,
77  OP_13 = 0x5d,
78  OP_14 = 0x5e,
79  OP_15 = 0x5f,
80  OP_16 = 0x60,
81 
82  // control
83  OP_NOP = 0x61,
84  OP_VER = 0x62,
85  OP_IF = 0x63,
86  OP_NOTIF = 0x64,
87  OP_VERIF = 0x65,
88  OP_VERNOTIF = 0x66,
89  OP_ELSE = 0x67,
90  OP_ENDIF = 0x68,
91  OP_VERIFY = 0x69,
92  OP_RETURN = 0x6a,
93 
94  // stack ops
95  OP_TOALTSTACK = 0x6b,
97  OP_2DROP = 0x6d,
98  OP_2DUP = 0x6e,
99  OP_3DUP = 0x6f,
100  OP_2OVER = 0x70,
101  OP_2ROT = 0x71,
102  OP_2SWAP = 0x72,
103  OP_IFDUP = 0x73,
104  OP_DEPTH = 0x74,
105  OP_DROP = 0x75,
106  OP_DUP = 0x76,
107  OP_NIP = 0x77,
108  OP_OVER = 0x78,
109  OP_PICK = 0x79,
110  OP_ROLL = 0x7a,
111  OP_ROT = 0x7b,
112  OP_SWAP = 0x7c,
113  OP_TUCK = 0x7d,
114 
115  // splice ops
116  OP_CAT = 0x7e,
117  OP_SUBSTR = 0x7f,
118  OP_LEFT = 0x80,
119  OP_RIGHT = 0x81,
120  OP_SIZE = 0x82,
121 
122  // bit logic
123  OP_INVERT = 0x83,
124  OP_AND = 0x84,
125  OP_OR = 0x85,
126  OP_XOR = 0x86,
127  OP_EQUAL = 0x87,
129  OP_RESERVED1 = 0x89,
130  OP_RESERVED2 = 0x8a,
131 
132  // numeric
133  OP_1ADD = 0x8b,
134  OP_1SUB = 0x8c,
135  OP_2MUL = 0x8d,
136  OP_2DIV = 0x8e,
137  OP_NEGATE = 0x8f,
138  OP_ABS = 0x90,
139  OP_NOT = 0x91,
140  OP_0NOTEQUAL = 0x92,
141 
142  OP_ADD = 0x93,
143  OP_SUB = 0x94,
144  OP_MUL = 0x95,
145  OP_DIV = 0x96,
146  OP_MOD = 0x97,
147  OP_LSHIFT = 0x98,
148  OP_RSHIFT = 0x99,
149 
150  OP_BOOLAND = 0x9a,
151  OP_BOOLOR = 0x9b,
152  OP_NUMEQUAL = 0x9c,
155  OP_LESSTHAN = 0x9f,
159  OP_MIN = 0xa3,
160  OP_MAX = 0xa4,
161 
162  OP_WITHIN = 0xa5,
163 
164  // crypto
165  OP_RIPEMD160 = 0xa6,
166  OP_SHA1 = 0xa7,
167  OP_SHA256 = 0xa8,
168  OP_HASH160 = 0xa9,
169  OP_HASH256 = 0xaa,
171  OP_CHECKSIG = 0xac,
175 
176  // expansion
177  OP_NOP1 = 0xb0,
182  OP_NOP4 = 0xb3,
183  OP_NOP5 = 0xb4,
184  OP_NOP6 = 0xb5,
185  OP_NOP7 = 0xb6,
186  OP_NOP8 = 0xb7,
187  OP_NOP9 = 0xb8,
188  OP_NOP10 = 0xb9,
189 
191 };
192 
193 // Maximum value that an opcode can be
194 static const unsigned int MAX_OPCODE = OP_NOP10;
195 
196 const char* GetOpName(opcodetype opcode);
197 
198 class scriptnum_error : public std::runtime_error
199 {
200 public:
201  explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {}
202 };
203 
205 {
214 public:
215 
216  explicit CScriptNum(const int64_t& n)
217  {
218  m_value = n;
219  }
220 
221  static const size_t nDefaultMaxNumSize = 4;
222 
223  explicit CScriptNum(const std::vector<unsigned char>& vch, bool fRequireMinimal,
224  const size_t nMaxNumSize = nDefaultMaxNumSize)
225  {
226  if (vch.size() > nMaxNumSize) {
227  throw scriptnum_error("script number overflow");
228  }
229  if (fRequireMinimal && vch.size() > 0) {
230  // Check that the number is encoded with the minimum possible
231  // number of bytes.
232  //
233  // If the most-significant-byte - excluding the sign bit - is zero
234  // then we're not minimal. Note how this test also rejects the
235  // negative-zero encoding, 0x80.
236  if ((vch.back() & 0x7f) == 0) {
237  // One exception: if there's more than one byte and the most
238  // significant bit of the second-most-significant-byte is set
239  // it would conflict with the sign bit. An example of this case
240  // is +-255, which encode to 0xff00 and 0xff80 respectively.
241  // (big-endian).
242  if (vch.size() <= 1 || (vch[vch.size() - 2] & 0x80) == 0) {
243  throw scriptnum_error("non-minimally encoded script number");
244  }
245  }
246  }
247  m_value = set_vch(vch);
248  }
249 
250  inline bool operator==(const int64_t& rhs) const { return m_value == rhs; }
251  inline bool operator!=(const int64_t& rhs) const { return m_value != rhs; }
252  inline bool operator<=(const int64_t& rhs) const { return m_value <= rhs; }
253  inline bool operator< (const int64_t& rhs) const { return m_value < rhs; }
254  inline bool operator>=(const int64_t& rhs) const { return m_value >= rhs; }
255  inline bool operator> (const int64_t& rhs) const { return m_value > rhs; }
256 
257  inline bool operator==(const CScriptNum& rhs) const { return operator==(rhs.m_value); }
258  inline bool operator!=(const CScriptNum& rhs) const { return operator!=(rhs.m_value); }
259  inline bool operator<=(const CScriptNum& rhs) const { return operator<=(rhs.m_value); }
260  inline bool operator< (const CScriptNum& rhs) const { return operator< (rhs.m_value); }
261  inline bool operator>=(const CScriptNum& rhs) const { return operator>=(rhs.m_value); }
262  inline bool operator> (const CScriptNum& rhs) const { return operator> (rhs.m_value); }
263 
264  inline CScriptNum operator+( const int64_t& rhs) const { return CScriptNum(m_value + rhs);}
265  inline CScriptNum operator-( const int64_t& rhs) const { return CScriptNum(m_value - rhs);}
266  inline CScriptNum operator+( const CScriptNum& rhs) const { return operator+(rhs.m_value); }
267  inline CScriptNum operator-( const CScriptNum& rhs) const { return operator-(rhs.m_value); }
268 
269  inline CScriptNum& operator+=( const CScriptNum& rhs) { return operator+=(rhs.m_value); }
270  inline CScriptNum& operator-=( const CScriptNum& rhs) { return operator-=(rhs.m_value); }
271 
272  inline CScriptNum operator&( const int64_t& rhs) const { return CScriptNum(m_value & rhs);}
273  inline CScriptNum operator&( const CScriptNum& rhs) const { return operator&(rhs.m_value); }
274 
275  inline CScriptNum& operator&=( const CScriptNum& rhs) { return operator&=(rhs.m_value); }
276 
277  inline CScriptNum operator-() const
278  {
279  assert(m_value != std::numeric_limits<int64_t>::min());
280  return CScriptNum(-m_value);
281  }
282 
283  inline CScriptNum& operator=( const int64_t& rhs)
284  {
285  m_value = rhs;
286  return *this;
287  }
288 
289  inline CScriptNum& operator+=( const int64_t& rhs)
290  {
291  assert(rhs == 0 || (rhs > 0 && m_value <= std::numeric_limits<int64_t>::max() - rhs) ||
292  (rhs < 0 && m_value >= std::numeric_limits<int64_t>::min() - rhs));
293  m_value += rhs;
294  return *this;
295  }
296 
297  inline CScriptNum& operator-=( const int64_t& rhs)
298  {
299  assert(rhs == 0 || (rhs > 0 && m_value >= std::numeric_limits<int64_t>::min() + rhs) ||
300  (rhs < 0 && m_value <= std::numeric_limits<int64_t>::max() + rhs));
301  m_value -= rhs;
302  return *this;
303  }
304 
305  inline CScriptNum& operator&=( const int64_t& rhs)
306  {
307  m_value &= rhs;
308  return *this;
309  }
310 
311  int getint() const
312  {
313  if (m_value > std::numeric_limits<int>::max())
314  return std::numeric_limits<int>::max();
315  else if (m_value < std::numeric_limits<int>::min())
316  return std::numeric_limits<int>::min();
317  return m_value;
318  }
319 
320  std::vector<unsigned char> getvch() const
321  {
322  return serialize(m_value);
323  }
324 
325  static std::vector<unsigned char> serialize(const int64_t& value)
326  {
327  if(value == 0)
328  return std::vector<unsigned char>();
329 
330  std::vector<unsigned char> result;
331  const bool neg = value < 0;
332  uint64_t absvalue = neg ? -value : value;
333 
334  while(absvalue)
335  {
336  result.push_back(absvalue & 0xff);
337  absvalue >>= 8;
338  }
339 
340 // - If the most significant byte is >= 0x80 and the value is positive, push a
341 // new zero-byte to make the significant byte < 0x80 again.
342 
343 // - If the most significant byte is >= 0x80 and the value is negative, push a
344 // new 0x80 byte that will be popped off when converting to an integral.
345 
346 // - If the most significant byte is < 0x80 and the value is negative, add
347 // 0x80 to it, since it will be subtracted and interpreted as a negative when
348 // converting to an integral.
349 
350  if (result.back() & 0x80)
351  result.push_back(neg ? 0x80 : 0);
352  else if (neg)
353  result.back() |= 0x80;
354 
355  return result;
356  }
357 
358 private:
359  static int64_t set_vch(const std::vector<unsigned char>& vch)
360  {
361  if (vch.empty())
362  return 0;
363 
364  int64_t result = 0;
365  for (size_t i = 0; i != vch.size(); ++i)
366  result |= static_cast<int64_t>(vch[i]) << 8*i;
367 
368  // If the input vector's most significant byte is 0x80, remove it from
369  // the result's msb and return a negative.
370  if (vch.back() & 0x80)
371  return -((int64_t)(result & ~(0x80ULL << (8 * (vch.size() - 1)))));
372 
373  return result;
374  }
375 
376  int64_t m_value;
377 };
378 
386 
387 bool GetScriptOp(CScriptBase::const_iterator& pc, CScriptBase::const_iterator end, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet);
388 
390 class CScript : public CScriptBase
391 {
392 protected:
393  CScript& push_int64(int64_t n)
394  {
395  if (n == -1 || (n >= 1 && n <= 16))
396  {
397  push_back(n + (OP_1 - 1));
398  }
399  else if (n == 0)
400  {
401  push_back(OP_0);
402  }
403  else
404  {
405  *this << CScriptNum::serialize(n);
406  }
407  return *this;
408  }
409 public:
410  CScript() { }
411  CScript(const_iterator pbegin, const_iterator pend) : CScriptBase(pbegin, pend) { }
412  CScript(std::vector<unsigned char>::const_iterator pbegin, std::vector<unsigned char>::const_iterator pend) : CScriptBase(pbegin, pend) { }
413  CScript(const unsigned char* pbegin, const unsigned char* pend) : CScriptBase(pbegin, pend) { }
414 
416 
417  template <typename Stream, typename Operation>
418  inline void SerializationOp(Stream& s, Operation ser_action) {
419  READWRITEAS(CScriptBase, *this);
420  }
421 
423  {
424  reserve(size() + b.size());
425  insert(end(), b.begin(), b.end());
426  return *this;
427  }
428 
429  friend CScript operator+(const CScript& a, const CScript& b)
430  {
431  CScript ret = a;
432  ret += b;
433  return ret;
434  }
435 
436  CScript(int64_t b) { operator<<(b); }
437 
438  explicit CScript(opcodetype b) { operator<<(b); }
439  explicit CScript(const CScriptNum& b) { operator<<(b); }
440  explicit CScript(const std::vector<unsigned char>& b) { operator<<(b); }
441 
442 
443  CScript& operator<<(int64_t b) { return push_int64(b); }
444 
446  {
447  if (opcode < 0 || opcode > 0xff)
448  throw std::runtime_error("CScript::operator<<(): invalid opcode");
449  insert(end(), (unsigned char)opcode);
450  return *this;
451  }
452 
454  {
455  *this << b.getvch();
456  return *this;
457  }
458 
459  CScript& operator<<(const std::vector<unsigned char>& b)
460  {
461  if (b.size() < OP_PUSHDATA1)
462  {
463  insert(end(), (unsigned char)b.size());
464  }
465  else if (b.size() <= 0xff)
466  {
467  insert(end(), OP_PUSHDATA1);
468  insert(end(), (unsigned char)b.size());
469  }
470  else if (b.size() <= 0xffff)
471  {
472  insert(end(), OP_PUSHDATA2);
473  uint8_t _data[2];
474  WriteLE16(_data, b.size());
475  insert(end(), _data, _data + sizeof(_data));
476  }
477  else
478  {
479  insert(end(), OP_PUSHDATA4);
480  uint8_t _data[4];
481  WriteLE32(_data, b.size());
482  insert(end(), _data, _data + sizeof(_data));
483  }
484  insert(end(), b.begin(), b.end());
485  return *this;
486  }
487 
489  {
490  // I'm not sure if this should push the script or concatenate scripts.
491  // If there's ever a use for pushing a script onto a script, delete this member fn
492  assert(!"Warning: Pushing a CScript onto a CScript with << is probably not intended, use + to concatenate!");
493  return *this;
494  }
495 
496 
497  bool GetOp(const_iterator& pc, opcodetype& opcodeRet, std::vector<unsigned char>& vchRet) const
498  {
499  return GetScriptOp(pc, end(), opcodeRet, &vchRet);
500  }
501 
502  bool GetOp(const_iterator& pc, opcodetype& opcodeRet) const
503  {
504  return GetScriptOp(pc, end(), opcodeRet, nullptr);
505  }
506 
507 
509  static int DecodeOP_N(opcodetype opcode)
510  {
511  if (opcode == OP_0)
512  return 0;
513  assert(opcode >= OP_1 && opcode <= OP_16);
514  return (int)opcode - (int)(OP_1 - 1);
515  }
516  static opcodetype EncodeOP_N(int n)
517  {
518  assert(n >= 0 && n <= 16);
519  if (n == 0)
520  return OP_0;
521  return (opcodetype)(OP_1+n-1);
522  }
523 
531  unsigned int GetSigOpCount(bool fAccurate) const;
532 
537  unsigned int GetSigOpCount(const CScript& scriptSig) const;
538 
539  bool IsPayToScriptHash() const;
540  bool IsPayToWitnessScriptHash() const;
541  bool IsWitnessProgram(int& version, std::vector<unsigned char>& program) const;
542 
544  bool IsPushOnly(const_iterator pc) const;
545  bool IsPushOnly() const;
546 
548  bool HasValidOps() const;
549 
555  bool IsUnspendable() const
556  {
557  return (size() > 0 && *begin() == OP_RETURN) || (size() > MAX_SCRIPT_SIZE);
558  }
559 
560  void clear()
561  {
562  // The default prevector::clear() does not release memory
564  shrink_to_fit();
565  }
566 };
567 
569 {
570  // Note that this encodes the data elements being pushed, rather than
571  // encoding them as a CScript that pushes them.
572  std::vector<std::vector<unsigned char> > stack;
573 
574  // Some compilers complain without a default constructor
576 
577  bool IsNull() const { return stack.empty(); }
578 
579  void SetNull() { stack.clear(); stack.shrink_to_fit(); }
580 
581  std::string ToString() const;
582 };
583 
584 #endif // BITCOIN_SCRIPT_SCRIPT_H
Definition: script.h:139
Definition: script.h:68
Definition: script.h:124
static int64_t set_vch(const std::vector< unsigned char > &vch)
Definition: script.h:359
ADD_SERIALIZE_METHODS
Definition: script.h:415
Definition: script.h:107
static int DecodeOP_N(opcodetype opcode)
Encode/decode small integers:
Definition: script.h:509
int getint() const
Definition: script.h:311
Definition: script.h:160
Definition: script.h:99
void clear()
Definition: prevector.h:338
bool GetOp(const_iterator &pc, opcodetype &opcodeRet, std::vector< unsigned char > &vchRet) const
Definition: script.h:497
CScriptNum(const int64_t &n)
Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers.
Definition: script.h:216
Definition: script.h:85
Definition: script.h:78
Definition: script.h:74
CScriptNum & operator-=(const int64_t &rhs)
Definition: script.h:297
Definition: script.h:138
Definition: script.h:66
Definition: script.h:145
Definition: script.h:72
Definition: script.h:67
CScript & push_int64(int64_t n)
Definition: script.h:393
std::vector< std::vector< unsigned char > > stack
Definition: script.h:572
void insert(Tdst &dst, const Tsrc &src)
Simplification of std insertion.
Definition: system.h:371
bool IsNull() const
Definition: script.h:577
Definition: script.h:159
friend CScript operator+(const CScript &a, const CScript &b)
Definition: script.h:429
bool operator<=(const int64_t &rhs) const
Definition: script.h:252
#define READWRITEAS(type, obj)
Definition: serialize.h:185
CScriptNum & operator=(const int64_t &rhs)
Definition: script.h:283
CScript(const std::vector< unsigned char > &b)
Definition: script.h:440
Definition: script.h:80
static std::vector< unsigned char > serialize(const int64_t &value)
Definition: script.h:325
Definition: script.h:76
const char * GetOpName(opcodetype opcode)
Definition: script.cpp:11
CScript(opcodetype b)
Definition: script.h:438
Definition: script.h:125
CScriptNum & operator+=(const CScriptNum &rhs)
Definition: script.h:269
bool IsUnspendable() const
Returns whether the script is guaranteed to fail at execution, regardless of the initial stack...
Definition: script.h:555
CScript & operator<<(const CScriptNum &b)
Definition: script.h:453
Definition: script.h:69
iterator end()
Definition: prevector.h:287
CScript & operator<<(opcodetype opcode)
Definition: script.h:445
Definition: script.h:146
opcodetype
Script opcodes.
Definition: script.h:54
CScript(const CScriptNum &b)
Definition: script.h:439
bool operator==(const CScriptNum &rhs) const
Definition: script.h:257
CScript & operator<<(const CScript &b)
Definition: script.h:488
Definition: script.h:116
CScriptNum operator+(const int64_t &rhs) const
Definition: script.h:264
bool operator!=(const int64_t &rhs) const
Definition: script.h:251
CScriptNum operator-() const
Definition: script.h:277
prevector< 28, unsigned char > CScriptBase
We use a prevector for the script to reduce the considerable memory overhead of vectors in cases wher...
Definition: script.h:385
CScript(int64_t b)
Definition: script.h:436
bool operator>=(const CScriptNum &rhs) const
Definition: script.h:261
CScriptNum operator+(const CScriptNum &rhs) const
Definition: script.h:266
Definition: script.h:71
CScript(const unsigned char *pbegin, const unsigned char *pend)
Definition: script.h:413
Definition: script.h:64
Definition: script.h:83
CScriptWitness()
Definition: script.h:575
std::vector< unsigned char > getvch() const
Definition: script.h:320
int64_t m_value
Definition: script.h:376
scriptnum_error(const std::string &str)
Definition: script.h:201
CScriptNum(const std::vector< unsigned char > &vch, bool fRequireMinimal, const size_t nMaxNumSize=nDefaultMaxNumSize)
Definition: script.h:223
CScript()
Definition: script.h:410
Definition: script.h:143
Definition: script.h:111
void SetNull()
Definition: script.h:579
Definition: script.h:144
Definition: script.h:89
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without h...
Definition: prevector.h:38
bool GetScriptOp(CScriptBase::const_iterator &pc, CScriptBase::const_iterator end, opcodetype &opcodeRet, std::vector< unsigned char > *pvchRet)
Definition: script.cpp:279
bool operator<(const CNetAddr &a, const CNetAddr &b)
Definition: netaddress.cpp:356
CScriptNum & operator-=(const CScriptNum &rhs)
Definition: script.h:270
Definition: script.h:73
CScriptNum operator-(const CScriptNum &rhs) const
Definition: script.h:267
Definition: script.h:98
CScriptNum operator-(const int64_t &rhs) const
Definition: script.h:265
CScript(const_iterator pbegin, const_iterator pend)
Definition: script.h:411
static opcodetype EncodeOP_N(int n)
Definition: script.h:516
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:390
CScript & operator+=(const CScript &b)
Definition: script.h:422
bool GetOp(const_iterator &pc, opcodetype &opcodeRet) const
Definition: script.h:502
Definition: script.h:70
CScript & operator<<(int64_t b)
Definition: script.h:443
iterator begin()
Definition: prevector.h:285
CScriptNum & operator+=(const int64_t &rhs)
Definition: script.h:289
size_type size() const
Definition: prevector.h:277
Definition: script.h:77
Definition: script.h:126
Definition: script.h:75
void SerializationOp(Stream &s, Operation ser_action)
Definition: script.h:418
Definition: script.h:84
Definition: script.h:65
Definition: script.h:57
void clear()
Definition: script.h:560
CScript(std::vector< unsigned char >::const_iterator pbegin, std::vector< unsigned char >::const_iterator pend)
Definition: script.h:412
Definition: script.h:142
bool operator==(const int64_t &rhs) const
Definition: script.h:250
bool operator>=(const int64_t &rhs) const
Definition: script.h:254
Definition: script.h:79
Definition: script.h:106
bool operator!=(const CScriptNum &rhs) const
Definition: script.h:258
std::vector< unsigned char > ToByteVector(const T &in)
Definition: script.h:48
bool operator<=(const CScriptNum &rhs) const
Definition: script.h:259