PIVX Core  5.6.99
P2P Digital Currency
Classes | Functions
script_tests.cpp File Reference
#include "test/test_pivx.h"
#include "test/data/script_tests.json.h"
#include "core_io.h"
#include "fs.h"
#include "key.h"
#include "keystore.h"
#include "script/script.h"
#include "script/script_error.h"
#include "script/sign.h"
#include <boost/algorithm/string/classification.hpp>
#include <boost/test/unit_test.hpp>
#include <univalue.h>
Include dependency graph for script_tests.cpp:

Go to the source code of this file.

Classes

struct  ScriptErrorDesc
 

Functions

unsigned int ParseScriptFlags (std::string strFlags)
 
std::string FormatScriptFlags (unsigned int flags)
 
UniValue read_json (const std::string &jsondata)
 
const char * FormatScriptError (ScriptError_t err)
 
ScriptError_t ParseScriptError (const std::string &name)
 
CMutableTransaction BuildCreditingTransaction (const CScript &scriptPubKey)
 
CMutableTransaction BuildSpendingTransaction (const CScript &scriptSig, const CMutableTransaction &txCredit)
 
void DoTest (const CScript &scriptPubKey, const CScript &scriptSig, int flags, const std::string &message, int scriptError)
 
 BOOST_AUTO_TEST_CASE (script_build)
 
 BOOST_AUTO_TEST_CASE (script_json_test)
 
 BOOST_AUTO_TEST_CASE (script_PushData)
 
CScript sign_multisig (const CScript &scriptPubKey, const std::vector< CKey > &keys, const CTransaction &transaction)
 
CScript sign_multisig (const CScript &scriptPubKey, const CKey &key, const CTransaction &transaction)
 
 BOOST_AUTO_TEST_CASE (script_CHECKMULTISIG12)
 
 BOOST_AUTO_TEST_CASE (script_CHECKMULTISIG23)
 
 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)
 
 BOOST_AUTO_TEST_CASE (script_FindAndDelete)
 
 BOOST_AUTO_TEST_CASE (script_can_append_self)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/11]

BOOST_AUTO_TEST_CASE ( script_build  )

Definition at line 388 of file script_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/11]

BOOST_AUTO_TEST_CASE ( script_can_append_self  )

Definition at line 1170 of file script_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [3/11]

BOOST_AUTO_TEST_CASE ( script_CHECKMULTISIG12  )

Definition at line 778 of file script_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/11]

BOOST_AUTO_TEST_CASE ( script_CHECKMULTISIG23  )

Definition at line 809 of file script_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/11]

BOOST_AUTO_TEST_CASE ( script_combineSigs  )

Definition at line 879 of file script_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/11]

BOOST_AUTO_TEST_CASE ( script_FindAndDelete  )

Definition at line 1061 of file script_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/11]

BOOST_AUTO_TEST_CASE ( script_GetScriptAsm  )

Definition at line 1022 of file script_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [8/11]

BOOST_AUTO_TEST_CASE ( script_IsPushOnly_on_invalid_scripts  )

Definition at line 1011 of file script_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [9/11]

BOOST_AUTO_TEST_CASE ( script_json_test  )

Definition at line 686 of file script_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [10/11]

BOOST_AUTO_TEST_CASE ( script_PushData  )

Definition at line 716 of file script_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [11/11]

BOOST_AUTO_TEST_CASE ( script_standard_push  )

Definition at line 990 of file script_tests.cpp.

Here is the call graph for this function:

◆ BuildCreditingTransaction()

CMutableTransaction BuildCreditingTransaction ( const CScript scriptPubKey)

Definition at line 108 of file script_tests.cpp.

Here is the caller graph for this function:

◆ BuildSpendingTransaction()

CMutableTransaction BuildSpendingTransaction ( const CScript scriptSig,
const CMutableTransaction txCredit 
)

Definition at line 124 of file script_tests.cpp.

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

◆ DoTest()

void DoTest ( const CScript scriptPubKey,
const CScript scriptSig,
int  flags,
const std::string &  message,
int  scriptError 
)

Definition at line 141 of file script_tests.cpp.

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

◆ FormatScriptError()

const char* FormatScriptError ( ScriptError_t  err)

Definition at line 88 of file script_tests.cpp.

Here is the caller graph for this function:

◆ FormatScriptFlags()

std::string FormatScriptFlags ( unsigned int  flags)

Definition at line 72 of file transaction_tests.cpp.

◆ ParseScriptError()

ScriptError_t ParseScriptError ( const std::string &  name)

Definition at line 97 of file script_tests.cpp.

Here is the caller graph for this function:

◆ ParseScriptFlags()

unsigned int ParseScriptFlags ( std::string  strFlags)

Definition at line 53 of file transaction_tests.cpp.

Here is the caller graph for this function:

◆ read_json()

UniValue read_json ( const std::string &  jsondata)

Definition at line 36 of file script_tests.cpp.

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

◆ sign_multisig() [1/2]

CScript sign_multisig ( const CScript scriptPubKey,
const CKey key,
const CTransaction transaction 
)

Definition at line 771 of file script_tests.cpp.

Here is the call graph for this function:

◆ sign_multisig() [2/2]

CScript sign_multisig ( const CScript scriptPubKey,
const std::vector< CKey > &  keys,
const CTransaction transaction 
)

Definition at line 747 of file script_tests.cpp.

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