Bitcoin Core  27.99.0
P2P Digital Currency
Functions
bitcoinconsensus.cpp File Reference
#include <script/bitcoinconsensus.h>
#include <primitives/transaction.h>
#include <pubkey.h>
#include <script/interpreter.h>
Include dependency graph for bitcoinconsensus.cpp:

Go to the source code of this file.

Functions

static bool verify_flags (unsigned int flags)
 Check that all specified flags are part of the libconsensus interface. More...
 
static int verify_script (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, CAmount amount, const unsigned char *txTo, unsigned int txToLen, const UTXO *spentOutputs, unsigned int spentOutputsLen, unsigned int nIn, unsigned int flags, bitcoinconsensus_error *err)
 
int bitcoinconsensus_verify_script_with_spent_outputs (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount, const unsigned char *txTo, unsigned int txToLen, const UTXO *spentOutputs, unsigned int spentOutputsLen, unsigned int nIn, unsigned int flags, bitcoinconsensus_error *err)
 
int bitcoinconsensus_verify_script_with_amount (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, bitcoinconsensus_error *err)
 
int bitcoinconsensus_verify_script (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, bitcoinconsensus_error *err)
 Returns 1 if the input nIn of the serialized transaction pointed to by txTo correctly spends the scriptPubKey pointed to by scriptPubKey under the additional constraints specified by flags. More...
 
unsigned int bitcoinconsensus_version ()
 

Function Documentation

◆ bitcoinconsensus_verify_script()

int bitcoinconsensus_verify_script ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
const unsigned char *  txTo,
unsigned int  txToLen,
unsigned int  nIn,
unsigned int  flags,
bitcoinconsensus_error err 
)

Returns 1 if the input nIn of the serialized transaction pointed to by txTo correctly spends the scriptPubKey pointed to by scriptPubKey under the additional constraints specified by flags.

If not nullptr, err will contain an error/success code for the operation

Definition at line 139 of file bitcoinconsensus.cpp.

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

◆ bitcoinconsensus_verify_script_with_amount()

int bitcoinconsensus_verify_script_with_amount ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
int64_t  amount,
const unsigned char *  txTo,
unsigned int  txToLen,
unsigned int  nIn,
unsigned int  flags,
bitcoinconsensus_error err 
)

Definition at line 128 of file bitcoinconsensus.cpp.

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

◆ bitcoinconsensus_verify_script_with_spent_outputs()

int bitcoinconsensus_verify_script_with_spent_outputs ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
int64_t  amount,
const unsigned char *  txTo,
unsigned int  txToLen,
const UTXO spentOutputs,
unsigned int  spentOutputsLen,
unsigned int  nIn,
unsigned int  flags,
bitcoinconsensus_error err 
)

Definition at line 119 of file bitcoinconsensus.cpp.

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

◆ bitcoinconsensus_version()

unsigned int bitcoinconsensus_version ( )

Definition at line 153 of file bitcoinconsensus.cpp.

Here is the caller graph for this function:

◆ verify_flags()

static bool verify_flags ( unsigned int  flags)
static

Check that all specified flags are part of the libconsensus interface.

Definition at line 64 of file bitcoinconsensus.cpp.

Here is the caller graph for this function:

◆ verify_script()

static int verify_script ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
CAmount  amount,
const unsigned char *  txTo,
unsigned int  txToLen,
const UTXO spentOutputs,
unsigned int  spentOutputsLen,
unsigned int  nIn,
unsigned int  flags,
bitcoinconsensus_error err 
)
static

Definition at line 69 of file bitcoinconsensus.cpp.

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