Changeset View
Changeset View
Standalone View
Standalone View
src/script/script.h
| Show All 31 Lines | |||||
| // Maximum script length in bytes | // Maximum script length in bytes | ||||
| static const int MAX_SCRIPT_SIZE = 10000; | static const int MAX_SCRIPT_SIZE = 10000; | ||||
| // Maximum number of values on script interpreter stack | // Maximum number of values on script interpreter stack | ||||
| static const int MAX_STACK_SIZE = 1000; | static const int MAX_STACK_SIZE = 1000; | ||||
| // Maximum byte size of integers for arithmetic opcodes when interpreting Script | // Maximum byte size of integers for arithmetic opcodes when interpreting Script | ||||
| constexpr size_t MAX_SCRIPTNUM_BYTE_SIZE = 4; | constexpr size_t MAX_SCRIPTNUM_BYTE_SIZE_31_BIT = 4; | ||||
| constexpr size_t MAX_SCRIPTNUM_BYTE_SIZE_63_BIT = 8; | |||||
| // Threshold for nLockTime: below this value it is interpreted as block number, | // Threshold for nLockTime: below this value it is interpreted as block number, | ||||
| // otherwise as UNIX timestamp. Thresold is Tue Nov 5 00:53:20 1985 UTC | // otherwise as UNIX timestamp. Thresold is Tue Nov 5 00:53:20 1985 UTC | ||||
| static const unsigned int LOCKTIME_THRESHOLD = 500000000; | static const unsigned int LOCKTIME_THRESHOLD = 500000000; | ||||
| template <typename T> std::vector<uint8_t> ToByteVector(const T &in) { | template <typename T> std::vector<uint8_t> ToByteVector(const T &in) { | ||||
| return std::vector<uint8_t>(in.begin(), in.end()); | return std::vector<uint8_t>(in.begin(), in.end()); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 508 Lines • Show Last 20 Lines | |||||