Bitcoin Core  27.99.0
P2P Digital Currency
Functions
sigopcount_tests.cpp File Reference
#include <addresstype.h>
#include <coins.h>
#include <consensus/consensus.h>
#include <consensus/tx_verify.h>
#include <key.h>
#include <pubkey.h>
#include <script/interpreter.h>
#include <script/script.h>
#include <script/solver.h>
#include <test/util/setup_common.h>
#include <uint256.h>
#include <vector>
#include <boost/test/unit_test.hpp>
Include dependency graph for sigopcount_tests.cpp:

Go to the source code of this file.

Functions

static std::vector< unsigned char > Serialize (const CScript &s)
 
 BOOST_AUTO_TEST_CASE (GetSigOpCount)
 
static ScriptError VerifyWithFlag (const CTransaction &output, const CMutableTransaction &input, uint32_t flags)
 Verifies script execution of the zeroth scriptPubKey of tx output and zeroth scriptSig and witness of tx input. More...
 
static void BuildTxs (CMutableTransaction &spendingTx, CCoinsViewCache &coins, CMutableTransaction &creationTx, const CScript &scriptPubKey, const CScript &scriptSig, const CScriptWitness &witness)
 Builds a creationTx from scriptPubKey and a spendingTx from scriptSig and witness such that spendingTx spends output zero of creationTx. More...
 
 BOOST_AUTO_TEST_CASE (GetTxSigOpCost)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( GetSigOpCount  )

Definition at line 31 of file sigopcount_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( GetTxSigOpCost  )

Definition at line 110 of file sigopcount_tests.cpp.

Here is the call graph for this function:

◆ BuildTxs()

static void BuildTxs ( CMutableTransaction spendingTx,
CCoinsViewCache coins,
CMutableTransaction creationTx,
const CScript scriptPubKey,
const CScript scriptSig,
const CScriptWitness witness 
)
static

Builds a creationTx from scriptPubKey and a spendingTx from scriptSig and witness such that spendingTx spends output zero of creationTx.

Also inserts creationTx's output into the coins view.

Definition at line 87 of file sigopcount_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Serialize()

static std::vector<unsigned char> Serialize ( const CScript s)
static

Definition at line 23 of file sigopcount_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VerifyWithFlag()

static ScriptError VerifyWithFlag ( const CTransaction output,
const CMutableTransaction input,
uint32_t  flags 
)
static

Verifies script execution of the zeroth scriptPubKey of tx output and zeroth scriptSig and witness of tx input.

Definition at line 72 of file sigopcount_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: