![]() |
Bitcoin Core
26.99.0
P2P Digital Currency
|
#include <test/data/script_tests.json.h>
#include <test/data/bip341_wallet_vectors.json.h>
#include <common/system.h>
#include <core_io.h>
#include <key.h>
#include <rpc/util.h>
#include <script/script.h>
#include <script/script_error.h>
#include <script/sigcache.h>
#include <script/sign.h>
#include <script/signingprovider.h>
#include <script/solver.h>
#include <streams.h>
#include <test/util/json.h>
#include <test/util/random.h>
#include <test/util/setup_common.h>
#include <test/util/transaction_utils.h>
#include <util/fs.h>
#include <util/strencodings.h>
#include <cstdint>
#include <fstream>
#include <string>
#include <vector>
#include <boost/test/unit_test.hpp>
#include <univalue.h>
Go to the source code of this file.
Classes | |
struct | ScriptErrorDesc |
Functions | |
unsigned int | ParseScriptFlags (std::string strFlags) |
std::string | FormatScriptFlags (unsigned int flags) |
static std::string | FormatScriptError (ScriptError_t err) |
static ScriptError_t | ParseScriptError (const std::string &name) |
void | DoTest (const CScript &scriptPubKey, const CScript &scriptSig, const CScriptWitness &scriptWitness, uint32_t flags, const std::string &message, int scriptError, CAmount nValue=0) |
static void | NegateSignatureS (std::vector< unsigned char > &vchSig) |
BOOST_AUTO_TEST_CASE (script_build) | |
BOOST_AUTO_TEST_CASE (script_json_test) | |
BOOST_AUTO_TEST_CASE (script_PushData) | |
BOOST_AUTO_TEST_CASE (script_cltv_truncated) | |
static CScript | sign_multisig (const CScript &scriptPubKey, const std::vector< CKey > &keys, const CTransaction &transaction) |
static CScript | sign_multisig (const CScript &scriptPubKey, const CKey &key, const CTransaction &transaction) |
BOOST_AUTO_TEST_CASE (script_CHECKMULTISIG12) | |
BOOST_AUTO_TEST_CASE (script_CHECKMULTISIG23) | |
SignatureData | CombineSignatures (const CTxOut &txout, const CMutableTransaction &tx, const SignatureData &scriptSig1, const SignatureData &scriptSig2) |
BOOST_AUTO_TEST_CASE (script_combineSigs) | |
BOOST_AUTO_TEST_CASE (script_standard_push) | |
BOOST_AUTO_TEST_CASE (script_IsPushOnly_on_invalid_scripts) | |
BOOST_AUTO_TEST_CASE (script_GetScriptAsm) | |
static CScript | ScriptFromHex (const std::string &str) |
BOOST_AUTO_TEST_CASE (script_FindAndDelete) | |
BOOST_AUTO_TEST_CASE (script_HasValidOps) | |
static CMutableTransaction | TxFromHex (const std::string &str) |
static std::vector< CTxOut > | TxOutsFromJSON (const UniValue &univalue) |
static CScriptWitness | ScriptWitnessFromJSON (const UniValue &univalue) |
static std::vector< unsigned int > | AllConsensusFlags () |
static void | AssetTest (const UniValue &test) |
BOOST_AUTO_TEST_CASE (script_assets_test) | |
BOOST_AUTO_TEST_CASE (bip341_keypath_test_vectors) | |
BOOST_AUTO_TEST_CASE (compute_tapbranch) | |
BOOST_AUTO_TEST_CASE (compute_tapleaf) | |
Variables | |
static const unsigned int | gFlags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC |
static ScriptErrorDesc | script_errors [] |
static const std::vector< unsigned int > | ALL_CONSENSUS_FLAGS = AllConsensusFlags() |
Precomputed list of all valid combinations of consensus-relevant script validation flags. More... | |
|
static |
Definition at line 1673 of file script_tests.cpp.
|
static |
Definition at line 1701 of file script_tests.cpp.
BOOST_AUTO_TEST_CASE | ( | bip341_keypath_test_vectors | ) |
BOOST_AUTO_TEST_CASE | ( | compute_tapbranch | ) |
BOOST_AUTO_TEST_CASE | ( | compute_tapleaf | ) |
BOOST_AUTO_TEST_CASE | ( | script_assets_test | ) |
BOOST_AUTO_TEST_CASE | ( | script_build | ) |
BOOST_AUTO_TEST_CASE | ( | script_CHECKMULTISIG12 | ) |
BOOST_AUTO_TEST_CASE | ( | script_CHECKMULTISIG23 | ) |
BOOST_AUTO_TEST_CASE | ( | script_cltv_truncated | ) |
BOOST_AUTO_TEST_CASE | ( | script_combineSigs | ) |
BOOST_AUTO_TEST_CASE | ( | script_FindAndDelete | ) |
BOOST_AUTO_TEST_CASE | ( | script_GetScriptAsm | ) |
BOOST_AUTO_TEST_CASE | ( | script_HasValidOps | ) |
BOOST_AUTO_TEST_CASE | ( | script_IsPushOnly_on_invalid_scripts | ) |
Definition at line 1300 of file script_tests.cpp.
BOOST_AUTO_TEST_CASE | ( | script_json_test | ) |
BOOST_AUTO_TEST_CASE | ( | script_PushData | ) |
BOOST_AUTO_TEST_CASE | ( | script_standard_push | ) |
SignatureData CombineSignatures | ( | const CTxOut & | txout, |
const CMutableTransaction & | tx, | ||
const SignatureData & | scriptSig1, | ||
const SignatureData & | scriptSig2 | ||
) |
Definition at line 1151 of file script_tests.cpp.
void DoTest | ( | const CScript & | scriptPubKey, |
const CScript & | scriptSig, | ||
const CScriptWitness & | scriptWitness, | ||
uint32_t | flags, | ||
const std::string & | message, | ||
int | scriptError, | ||
CAmount | nValue = 0 |
||
) |
Definition at line 119 of file script_tests.cpp.
|
static |
std::string FormatScriptFlags | ( | unsigned int | flags | ) |
Definition at line 96 of file transaction_tests.cpp.
|
static |
|
static |
unsigned int ParseScriptFlags | ( | std::string | strFlags | ) |
Definition at line 70 of file transaction_tests.cpp.
|
static |
Definition at line 1341 of file script_tests.cpp.
|
static |
Definition at line 1489 of file script_tests.cpp.
|
static |
|
static |
Definition at line 1020 of file script_tests.cpp.
|
static |
Definition at line 1470 of file script_tests.cpp.
Definition at line 1477 of file script_tests.cpp.
|
static |
Precomputed list of all valid combinations of consensus-relevant script validation flags.
Definition at line 1699 of file script_tests.cpp.
|
static |
Definition at line 42 of file script_tests.cpp.
|
static |
Definition at line 53 of file script_tests.cpp.