Anoncoin  0.9.4
P2P Digital Currency
Classes | Macros | Typedefs | Functions
script.cpp File Reference
#include "script.h"
#include "core.h"
#include "hash.h"
#include "key.h"
#include "keystore.h"
#include "sync.h"
#include "uint256.h"
#include "util.h"
#include <boost/foreach.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/tuple/tuple_comparison.hpp>
Include dependency graph for script.cpp:

Go to the source code of this file.

Classes

class  CSignatureCache
 
class  CKeyStoreIsMineVisitor
 
class  CAffectedKeysVisitor
 
class  CScriptVisitor
 

Macros

#define stacktop(i)   (stack.at(stack.size()+(i)))
 
#define altstacktop(i)   (altstack.at(altstack.size()+(i)))
 

Typedefs

typedef vector< unsigned char > valtype
 

Functions

bool CheckSig (vector< unsigned char > vchSig, const vector< unsigned char > &vchPubKey, const CScript &scriptCode, const CTransaction &txTo, unsigned int nIn, int nHashType, int flags)
 
bool CastToBool (const valtype &vch)
 
const char * GetTxnOutputType (txnouttype t)
 
const char * GetOpName (opcodetype opcode)
 
bool IsCanonicalPubKey (const valtype &vchPubKey, unsigned int flags)
 
bool IsCanonicalSignature (const valtype &vchSig, unsigned int flags)
 
bool EvalScript (vector< vector< unsigned char > > &stack, const CScript &script, const CTransaction &txTo, unsigned int nIn, unsigned int flags, int nHashType)
 
uint256 SignatureHash (const CScript &scriptCode, const CTransaction &txTo, unsigned int nIn, int nHashType)
 
bool Solver (const CScript &scriptPubKey, txnouttype &typeRet, vector< vector< unsigned char > > &vSolutionsRet)
 
bool Sign1 (const CKeyID &address, const CKeyStore &keystore, uint256 hash, int nHashType, CScript &scriptSigRet)
 
bool SignN (const vector< valtype > &multisigdata, const CKeyStore &keystore, uint256 hash, int nHashType, CScript &scriptSigRet)
 
bool Solver (const CKeyStore &keystore, const CScript &scriptPubKey, uint256 hash, int nHashType, CScript &scriptSigRet, txnouttype &whichTypeRet)
 
int ScriptSigArgsExpected (txnouttype t, const std::vector< std::vector< unsigned char > > &vSolutions)
 
bool IsStandard (const CScript &scriptPubKey, txnouttype &whichType)
 
unsigned int HaveKeys (const vector< valtype > &pubkeys, const CKeyStore &keystore)
 
isminetype IsMine (const CKeyStore &keystore, const CTxDestination &dest)
 
isminetype IsMine (const CKeyStore &keystore, const CScript &scriptPubKey)
 
bool ExtractDestination (const CScript &scriptPubKey, CTxDestination &addressRet)
 
bool ExtractDestinations (const CScript &scriptPubKey, txnouttype &typeRet, vector< CTxDestination > &addressRet, int &nRequiredRet)
 
void ExtractAffectedKeys (const CKeyStore &keystore, const CScript &scriptPubKey, std::vector< CKeyID > &vKeys)
 
bool VerifyScript (const CScript &scriptSig, const CScript &scriptPubKey, const CTransaction &txTo, unsigned int nIn, unsigned int flags, int nHashType)
 
bool SignSignature (const CKeyStore &keystore, const CScript &fromPubKey, CTransaction &txTo, unsigned int nIn, int nHashType)
 
bool SignSignature (const CKeyStore &keystore, const CTransaction &txFrom, CTransaction &txTo, unsigned int nIn, int nHashType)
 
CScript CombineSignatures (CScript scriptPubKey, const CTransaction &txTo, unsigned int nIn, const CScript &scriptSig1, const CScript &scriptSig2)
 

Macro Definition Documentation

#define altstacktop (   i)    (altstack.at(altstack.size()+(i)))

Definition at line 57 of file script.cpp.

#define stacktop (   i)    (stack.at(stack.size()+(i)))

Definition at line 56 of file script.cpp.

Typedef Documentation

typedef vector<unsigned char> valtype

Definition at line 24 of file script.cpp.

Function Documentation

bool CastToBool ( const valtype vch)

Definition at line 35 of file script.cpp.

Here is the caller graph for this function:

bool CheckSig ( vector< unsigned char >  vchSig,
const vector< unsigned char > &  vchPubKey,
const CScript scriptCode,
const CTransaction txTo,
unsigned int  nIn,
int  nHashType,
int  flags 
)

Definition at line 1144 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CScript CombineSignatures ( CScript  scriptPubKey,
const CTransaction txTo,
unsigned int  nIn,
const CScript scriptSig1,
const CScript scriptSig2 
)

Definition at line 1803 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool EvalScript ( vector< vector< unsigned char > > &  stack,
const CScript script,
const CTransaction txTo,
unsigned int  nIn,
unsigned int  flags,
int  nHashType 
)

Definition at line 298 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ExtractAffectedKeys ( const CKeyStore keystore,
const CScript scriptPubKey,
std::vector< CKeyID > &  vKeys 
)

Definition at line 1604 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ExtractDestination ( const CScript scriptPubKey,
CTxDestination addressRet 
)

Definition at line 1513 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ExtractDestinations ( const CScript scriptPubKey,
txnouttype typeRet,
vector< CTxDestination > &  addressRet,
int &  nRequiredRet 
)

Definition at line 1539 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const char* GetOpName ( opcodetype  opcode)

Definition at line 81 of file script.cpp.

Here is the caller graph for this function:

const char* GetTxnOutputType ( txnouttype  t)

Definition at line 66 of file script.cpp.

Here is the caller graph for this function:

unsigned int HaveKeys ( const vector< valtype > &  pubkeys,
const CKeyStore keystore 
)

Definition at line 1426 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool IsCanonicalPubKey ( const valtype vchPubKey,
unsigned int  flags 
)

Definition at line 225 of file script.cpp.

Here is the caller graph for this function:

bool IsCanonicalSignature ( const valtype vchSig,
unsigned int  flags 
)

Definition at line 243 of file script.cpp.

Here is the caller graph for this function:

isminetype IsMine ( const CKeyStore keystore,
const CTxDestination dest 
)

Definition at line 1450 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

isminetype IsMine ( const CKeyStore keystore,
const CScript scriptPubKey 
)

Definition at line 1457 of file script.cpp.

Here is the call graph for this function:

bool IsStandard ( const CScript scriptPubKey,
txnouttype whichType 
)

Definition at line 1405 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int ScriptSigArgsExpected ( txnouttype  t,
const std::vector< std::vector< unsigned char > > &  vSolutions 
)

Definition at line 1384 of file script.cpp.

Here is the caller graph for this function:

bool Sign1 ( const CKeyID address,
const CKeyStore keystore,
uint256  hash,
int  nHashType,
CScript scriptSigRet 
)

Definition at line 1310 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint256 SignatureHash ( const CScript scriptCode,
const CTransaction txTo,
unsigned int  nIn,
int  nHashType 
)

Definition at line 1063 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SignN ( const vector< valtype > &  multisigdata,
const CKeyStore keystore,
uint256  hash,
int  nHashType,
CScript scriptSigRet 
)

Definition at line 1325 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SignSignature ( const CKeyStore keystore,
const CScript fromPubKey,
CTransaction txTo,
unsigned int  nIn,
int  nHashType 
)

Definition at line 1650 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SignSignature ( const CKeyStore keystore,
const CTransaction txFrom,
CTransaction txTo,
unsigned int  nIn,
int  nHashType 
)

Definition at line 1685 of file script.cpp.

Here is the call graph for this function:

bool Solver ( const CScript scriptPubKey,
txnouttype typeRet,
vector< vector< unsigned char > > &  vSolutionsRet 
)

Definition at line 1187 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Solver ( const CKeyStore keystore,
const CScript scriptPubKey,
uint256  hash,
int  nHashType,
CScript scriptSigRet,
txnouttype whichTypeRet 
)

Definition at line 1345 of file script.cpp.

Here is the call graph for this function:

bool VerifyScript ( const CScript scriptSig,
const CScript scriptPubKey,
const CTransaction txTo,
unsigned int  nIn,
unsigned int  flags,
int  nHashType 
)

Definition at line 1608 of file script.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: