Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Enumerations | Functions | Variables
main.h File Reference
#include "bignum.h"
#include "chainparams.h"
#include "coins.h"
#include "core.h"
#include "net.h"
#include "script.h"
#include "sync.h"
#include "txmempool.h"
#include "uint256.h"
#include <algorithm>
#include <exception>
#include <map>
#include <set>
#include <stdint.h>
#include <string>
#include <utility>
#include <vector>
+ Include dependency graph for main.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CNodeStateStats
 
struct  CDiskBlockPos
 
struct  CDiskTxPos
 
class  CBlockUndo
 Undo information for a CBlock. More...
 
class  CScriptCheck
 Closure representing one script verification Note that this stores references to the spending transaction. More...
 
class  CMerkleTx
 A transaction with a merkle branch linking it to the block chain. More...
 
class  CPartialMerkleTree
 Data structure that represents a partial merkle tree. More...
 
class  CBlockFileInfo
 
class  CBlockIndex
 The block chain is a tree shaped structure starting with the genesis block at the root, with each block potentially having multiple candidates to be the next block. More...
 
class  CDiskBlockIndex
 Used to marshal pointers into hashes for db storage. More...
 
class  CValidationState
 Capture information about block/transaction validation. More...
 
class  CChain
 An in-memory indexed chain of blocks. More...
 
struct  CBlockTemplate
 
class  CMerkleBlock
 Used to relay blocks as header + vector<merkle branch> to filtered nodes. More...
 
class  CWalletInterface
 

Enumerations

enum  GetMinFee_mode {
  GMF_RELAY,
  GMF_SEND
}
 
enum  BlockStatus {
  BLOCK_VALID_UNKNOWN = 0,
  BLOCK_VALID_HEADER = 1,
  BLOCK_VALID_TREE = 2,
  BLOCK_VALID_TRANSACTIONS = 3,
  BLOCK_VALID_CHAIN = 4,
  BLOCK_VALID_SCRIPTS = 5,
  BLOCK_VALID_MASK = 7,
  BLOCK_HAVE_DATA = 8,
  BLOCK_HAVE_UNDO = 16,
  BLOCK_HAVE_MASK = 24,
  BLOCK_FAILED_VALID = 32,
  BLOCK_FAILED_CHILD = 64,
  BLOCK_FAILED_MASK = 96
}
 

Functions

void RegisterWallet (CWalletInterface *pwalletIn)
 Register a wallet to receive updates from core. More...
 
void UnregisterWallet (CWalletInterface *pwalletIn)
 Unregister a wallet from core. More...
 
void UnregisterAllWallets ()
 Unregister all wallets from core. More...
 
void SyncWithWallets (const uint256 &hash, const CTransaction &tx, const CBlock *pblock=NULL)
 Push an updated transaction to all registered wallets. More...
 
void RegisterNodeSignals (CNodeSignals &nodeSignals)
 Register with a network node to receive its signals. More...
 
void UnregisterNodeSignals (CNodeSignals &nodeSignals)
 Unregister a network node. More...
 
void PushGetBlocks (CNode *pnode, CBlockIndex *pindexBegin, uint256 hashEnd)
 
bool ProcessBlock (CValidationState &state, CNode *pfrom, CBlock *pblock, CDiskBlockPos *dbp=NULL)
 Process an incoming block. More...
 
bool CheckDiskSpace (uint64_t nAdditionalBytes=0)
 Check whether enough disk space is available for an incoming block. More...
 
FILE * OpenBlockFile (const CDiskBlockPos &pos, bool fReadOnly=false)
 Open a block file (blk?????.dat) More...
 
FILE * OpenUndoFile (const CDiskBlockPos &pos, bool fReadOnly=false)
 Open an undo file (rev?????.dat) More...
 
bool LoadExternalBlockFile (FILE *fileIn, CDiskBlockPos *dbp=NULL)
 Import blocks from an external file. More...
 
bool InitBlockIndex ()
 Initialize a new block tree database + block data on disk. More...
 
bool LoadBlockIndex ()
 Load the block tree and coins database from disk. More...
 
void UnloadBlockIndex ()
 Unload database information. More...
 
bool VerifyDB (int nCheckLevel, int nCheckDepth)
 Verify consistency of the block and coin databases. More...
 
void PrintBlockTree ()
 Print the loaded block tree. More...
 
bool ProcessMessages (CNode *pfrom)
 Process protocol messages received from a given node. More...
 
bool SendMessages (CNode *pto, bool fSendTrickle)
 Send queued protocol messages to be sent to a give node. More...
 
void ThreadScriptCheck ()
 Run an instance of the script checking thread. More...
 
bool CheckProofOfWork (uint256 hash, unsigned int nBits)
 Check whether a block hash satisfies the proof-of-work requirement specified by nBits. More...
 
unsigned int ComputeMinWork (unsigned int nBase, int64_t nTime)
 Calculate the minimum amount of work a received block needs, without knowing its direct parent. More...
 
bool IsInitialBlockDownload ()
 Check whether we are doing an initial block download (synchronizing from disk or network) More...
 
std::string GetWarnings (std::string strFor)
 Format a string that describes several potential problems detected by the core. More...
 
bool GetTransaction (const uint256 &hash, CTransaction &tx, uint256 &hashBlock, bool fAllowSlow=false)
 Retrieve a transaction (from memory pool, or from disk, if possible) More...
 
bool ActivateBestChain (CValidationState &state)
 Find the best known block, and make it the tip of the block chain. More...
 
int64_t GetBlockValue (int nHeight, int64_t nFees)
 
unsigned int GetNextWorkRequired (const CBlockIndex *pindexLast, const CBlockHeader *pblock)
 
void UpdateTime (CBlockHeader &block, const CBlockIndex *pindexPrev)
 
CBlockIndexInsertBlockIndex (uint256 hash)
 Create a new block index entry for a given block hash. More...
 
bool VerifySignature (const CCoins &txFrom, const CTransaction &txTo, unsigned int nIn, unsigned int flags, int nHashType)
 Verify a signature. More...
 
bool AbortNode (const std::string &msg)
 Abort with a message. More...
 
bool GetNodeStateStats (NodeId nodeid, CNodeStateStats &stats)
 Get statistics from node state. More...
 
void Misbehaving (NodeId nodeid, int howmuch)
 Increase a node's misbehavior score. More...
 
bool AcceptToMemoryPool (CTxMemPool &pool, CValidationState &state, const CTransaction &tx, bool fLimitFree, bool *pfMissingInputs, bool fRejectInsaneFee=false)
 (try to) add transaction to memory pool More...
 
int64_t GetMinFee (const CTransaction &tx, unsigned int nBytes, bool fAllowFree, enum GetMinFee_mode mode)
 
bool AreInputsStandard (const CTransaction &tx, CCoinsViewCache &mapInputs)
 Check for standard transaction types. More...
 
unsigned int GetLegacySigOpCount (const CTransaction &tx)
 Count ECDSA signature operations the old-fashioned (pre-0.6) way. More...
 
unsigned int GetP2SHSigOpCount (const CTransaction &tx, CCoinsViewCache &mapInputs)
 Count ECDSA signature operations in pay-to-script-hash inputs. More...
 
bool AllowFree (double dPriority)
 
bool CheckInputs (const CTransaction &tx, CValidationState &state, CCoinsViewCache &view, bool fScriptChecks=true, unsigned int flags=SCRIPT_VERIFY_P2SH|SCRIPT_VERIFY_STRICTENC, std::vector< CScriptCheck > *pvChecks=NULL)
 
void UpdateCoins (const CTransaction &tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight, const uint256 &txhash)
 
bool CheckTransaction (const CTransaction &tx, CValidationState &state)
 
bool IsStandardTx (const CTransaction &tx, std::string &reason)
 Check for standard transaction types. More...
 
bool IsFinalTx (const CTransaction &tx, int nBlockHeight=0, int64_t nBlockTime=0)
 
bool WriteBlockToDisk (CBlock &block, CDiskBlockPos &pos)
 Functions for disk access for blocks. More...
 
bool ReadBlockFromDisk (CBlock &block, const CDiskBlockPos &pos)
 
bool ReadBlockFromDisk (CBlock &block, const CBlockIndex *pindex)
 
bool DisconnectBlock (CBlock &block, CValidationState &state, CBlockIndex *pindex, CCoinsViewCache &coins, bool *pfClean=NULL)
 Functions for validating blocks and updating the block tree. More...
 
bool ConnectBlock (CBlock &block, CValidationState &state, CBlockIndex *pindex, CCoinsViewCache &coins, bool fJustCheck=false)
 
bool AddToBlockIndex (CBlock &block, CValidationState &state, const CDiskBlockPos &pos)
 
bool CheckBlock (const CBlock &block, CValidationState &state, bool fCheckPOW=true, bool fCheckMerkleRoot=true)
 
bool AcceptBlock (CBlock &block, CValidationState &state, CDiskBlockPos *dbp=NULL)
 

Variables

static const unsigned int MAX_BLOCK_SIZE = 1000000
 The maximum allowed size for a serialized block, in bytes (network rule) More...
 
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000
 Default for -blockmaxsize and -blockminsize, which control the range of sizes the mining code will create. More...
 
static const unsigned int DEFAULT_BLOCK_MIN_SIZE = 0
 
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 50000
 Default for -blockprioritysize, maximum space for zero/low-fee transactions. More...
 
static const unsigned int MAX_STANDARD_TX_SIZE = 100000
 The maximum size for transactions we're willing to relay/mine. More...
 
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50
 The maximum allowed number of signature check operations in a block (network rule) More...
 
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100
 Default for -maxorphantx, maximum number of orphan transactions kept in memory. More...
 
static const unsigned int DEFAULT_MAX_ORPHAN_BLOCKS = 750
 Default for -maxorphanblocks, maximum number of orphan blocks kept in memory. More...
 
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000
 The maximum size of a blk?????.dat file (since 0.8) More...
 
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000
 The pre-allocation chunk size for blk?????.dat files (since 0.8) More...
 
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000
 The pre-allocation chunk size for rev?????.dat files (since 0.8) More...
 
static const int COINBASE_MATURITY = 100
 Coinbase transaction outputs can only be spent after this number of new blocks (network rule) More...
 
static const unsigned int LOCKTIME_THRESHOLD = 500000000
 Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. More...
 
static const int MAX_SCRIPTCHECK_THREADS = 16
 Maximum number of script-checking threads allowed. More...
 
static const int DEFAULT_SCRIPTCHECK_THREADS = 0
 -par default (number of script-checking threads, 0 = auto) More...
 
static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 128
 Number of blocks that can be requested at any given time from a single peer. More...
 
static const unsigned int BLOCK_DOWNLOAD_TIMEOUT = 60
 Timeout in seconds before considering a block download peer unresponsive. More...
 
static const int fHaveUPnP = false
 
static const unsigned char REJECT_MALFORMED = 0x01
 "reject" message codes More...
 
static const unsigned char REJECT_INVALID = 0x10
 
static const unsigned char REJECT_OBSOLETE = 0x11
 
static const unsigned char REJECT_DUPLICATE = 0x12
 
static const unsigned char REJECT_NONSTANDARD = 0x40
 
static const unsigned char REJECT_DUST = 0x41
 
static const unsigned char REJECT_INSUFFICIENTFEE = 0x42
 
static const unsigned char REJECT_CHECKPOINT = 0x43
 
CScript COINBASE_FLAGS
 
CCriticalSection cs_main
 
CTxMemPool mempool
 
std::map< uint256, CBlockIndex * > mapBlockIndex
 
uint64_t nLastBlockTx
 
uint64_t nLastBlockSize
 
const std::string strMessageMagic
 
int64_t nTimeBestReceived
 
bool fImporting
 
bool fReindex
 
bool fBenchmark
 
int nScriptCheckThreads
 
bool fTxIndex
 
unsigned int nCoinCacheSize
 
static const uint64_t nMinDiskSpace = 52428800
 
CChain chainActive
 The currently-connected chain of blocks. More...
 
CChain chainMostWork
 The currently best known chain of headers (some of which may be invalid). More...
 
CCoinsViewCachepcoinsTip
 Global variable that points to the active CCoinsView (protected by cs_main) More...
 
CBlockTreeDBpblocktree
 Global variable that points to the active block tree (protected by cs_main) More...
 

Enumeration Type Documentation

Enumerator
BLOCK_VALID_UNKNOWN 
BLOCK_VALID_HEADER 
BLOCK_VALID_TREE 
BLOCK_VALID_TRANSACTIONS 
BLOCK_VALID_CHAIN 
BLOCK_VALID_SCRIPTS 
BLOCK_VALID_MASK 
BLOCK_HAVE_DATA 
BLOCK_HAVE_UNDO 
BLOCK_HAVE_MASK 
BLOCK_FAILED_VALID 
BLOCK_FAILED_CHILD 
BLOCK_FAILED_MASK 

Definition at line 665 of file main.h.

Enumerator
GMF_RELAY 
GMF_SEND 

Definition at line 258 of file main.h.

Function Documentation

bool AbortNode ( const std::string &  msg)

Abort with a message.

Definition at line 2798 of file main.cpp.

References LogPrintf, CClientUIInterface::MSG_ERROR, StartShutdown(), strMiscWarning, CClientUIInterface::ThreadSafeMessageBox, and uiInterface.

Referenced by CValidationState::Abort(), CheckDiskSpace(), and LoadExternalBlockFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool AcceptBlock ( CBlock block,
CValidationState state,
CDiskBlockPos dbp = NULL 
)
bool AcceptToMemoryPool ( CTxMemPool pool,
CValidationState state,
const CTransaction tx,
bool  fLimitFree,
bool *  pfMissingInputs,
bool  fRejectInsaneFee = false 
)
bool ActivateBestChain ( CValidationState state)

Find the best known block, and make it the tip of the block chain.

Definition at line 2138 of file main.cpp.

References ConnectTip(), CChain::Contains(), CValidationState::CorruptionPossible(), DisconnectTip(), FindMostWorkChain(), GetArg(), CBlockIndex::GetBlockHash(), base_uint< BITS >::GetHex(), CChain::Height(), InvalidChainFound(), IsInitialBlockDownload(), CValidationState::IsInvalid(), LOCK, runCommand(), and CChain::Tip().

Referenced by AddToBlockIndex(), and AppInit2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool AddToBlockIndex ( CBlock block,
CValidationState state,
const CDiskBlockPos pos 
)
bool AllowFree ( double  dPriority)
inline

Definition at line 299 of file main.h.

References COIN.

Referenced by CreateNewBlock(), CoinControlDialog::getPriorityLabel(), and CoinControlDialog::updateLabels().

+ Here is the caller graph for this function:

bool AreInputsStandard ( const CTransaction tx,
CCoinsViewCache mapInputs 
)

Check for standard transaction types.

Parameters
[in]mapInputsMap of previous transactions that have outputs we're spending
Returns
True if all inputs (scriptSigs) use only standard transaction forms

Definition at line 623 of file main.cpp.

References EvalScript(), CCoinsViewCache::GetOutputFor(), CTransaction::IsCoinBase(), CTxOut::scriptPubKey, ScriptSigArgsExpected(), Solver(), TX_SCRIPTHASH, and CTransaction::vin.

Referenced by AcceptToMemoryPool().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CheckBlock ( const CBlock block,
CValidationState state,
bool  fCheckPOW = true,
bool  fCheckMerkleRoot = true 
)

Definition at line 2339 of file main.cpp.

References CBlock::BuildMerkleTree(), CheckProofOfWork(), CheckTransaction(), CValidationState::DoS(), error(), GetAdjustedTime(), CBlockHeader::GetBlockTime(), CBlockHeader::GetHash(), GetLegacySigOpCount(), GetSerializeSize(), CBlock::GetTxHash(), CBlockHeader::hashMerkleRoot, CValidationState::Invalid(), MAX_BLOCK_SIGOPS, MAX_BLOCK_SIZE, CBlockHeader::nBits, PROTOCOL_VERSION, REJECT_INVALID, SER_NETWORK, CBlock::vMerkleTree, and CBlock::vtx.

Referenced by ConnectBlock(), ProcessBlock(), and VerifyDB().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CheckDiskSpace ( uint64_t  nAdditionalBytes = 0)

Check whether enough disk space is available for an incoming block.

Definition at line 2806 of file main.cpp.

References _(), AbortNode(), GetDataDir(), and nMinDiskSpace.

Referenced by AppInit2(), FindBlockPos(), FindUndoPos(), and WriteChainState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CheckInputs ( const CTransaction tx,
CValidationState state,
CCoinsViewCache view,
bool  fScriptChecks = true,
unsigned int  flags = SCRIPT_VERIFY_P2SH|SCRIPT_VERIFY_STRICTENC,
std::vector< CScriptCheck > *  pvChecks = NULL 
)

Definition at line 1549 of file main.cpp.

References COINBASE_MATURITY, CValidationState::DoS(), error(), CCoinsViewCache::GetBestBlock(), CCoinsViewCache::GetCoins(), CTransaction::GetHash(), CTransaction::GetValueOut(), COutPoint::hash, CCoinsViewCache::HaveInputs(), CValidationState::Invalid(), CCoins::IsCoinBase(), CTransaction::IsCoinBase(), MoneyRange(), COutPoint::n, CCoins::nHeight, CBlockIndex::nHeight, REJECT_INVALID, REJECT_NONSTANDARD, SCRIPT_VERIFY_STRICTENC, CScriptCheck::swap(), base_uint< BITS >::ToString(), CTransaction::vin, and CCoins::vout.

Referenced by AcceptToMemoryPool(), ConnectBlock(), and CreateNewBlock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CheckProofOfWork ( uint256  hash,
unsigned int  nBits 
)

Check whether a block hash satisfies the proof-of-work requirement specified by nBits.

Definition at line 1325 of file main.cpp.

References error(), CBigNum::getuint256(), Params(), and CBigNum::SetCompact().

Referenced by CheckBlock(), CBlockIndex::CheckIndex(), and ReadBlockFromDisk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CheckTransaction ( const CTransaction tx,
CValidationState state 
)

Definition at line 760 of file main.cpp.

References CValidationState::DoS(), error(), GetSerializeSize(), CTransaction::IsCoinBase(), COutPoint::IsNull(), MAX_BLOCK_SIZE, MAX_MONEY, MoneyRange(), CTxOut::nValue, CTxIn::prevout, PROTOCOL_VERSION, REJECT_INVALID, SER_NETWORK, CTransaction::vin, and CTransaction::vout.

Referenced by AcceptToMemoryPool(), CheckBlock(), and ReadKeyValue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int ComputeMinWork ( unsigned int  nBase,
int64_t  nTime 
)

Calculate the minimum amount of work a received block needs, without knowing its direct parent.

Definition at line 1241 of file main.cpp.

References CBigNum::GetCompact(), Params(), CChainParams::ProofOfWorkLimit(), CBigNum::SetCompact(), and TestNet().

Referenced by ProcessBlock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ConnectBlock ( CBlock block,
CValidationState state,
CBlockIndex pindex,
CCoinsViewCache coins,
bool  fJustCheck = false 
)

Definition at line 1758 of file main.cpp.

References _(), CValidationState::Abort(), CCheckQueueControl< T >::Add(), AssertLockHeld, BLOCK_HAVE_UNDO, BLOCK_VALID_MASK, BLOCK_VALID_SCRIPTS, CheckBlock(), CheckInputs(), CLIENT_VERSION, CValidationState::DoS(), error(), fBenchmark, FindUndoPos(), fTxIndex, g_signals, CCoinsViewCache::GetBestBlock(), CBlockIndex::GetBlockHash(), CBlockIndex::GetBlockPos(), GetBlockValue(), CCoinsViewCache::GetCoins(), CBlockHeader::GetHash(), GetLegacySigOpCount(), GetP2SHSigOpCount(), GetSerializeSize(), GetSizeOfCompactSize(), GetTimeMicros(), Checkpoints::GetTotalBlocksEstimate(), CBlock::GetTxHash(), CBlockIndex::GetUndoPos(), CCoinsViewCache::GetValueIn(), CTransaction::GetValueOut(), CChainParams::HashGenesisBlock(), CCoinsViewCache::HaveCoins(), CCoinsViewCache::HaveInputs(), CTransaction::IsCoinBase(), CDiskBlockPos::IsNull(), LogPrintf, MAX_BLOCK_SIGOPS, CBlockIndex::nFile, CBlockIndex::nHeight, CDiskBlockPos::nPos, CBlockIndex::nStatus, CBlockIndex::nTime, CDiskTxPos::nTxOffset, CBlockIndex::nUndoPos, Params(), CBlockIndex::phashBlock, CBlockIndex::pprev, REJECT_INVALID, SCRIPT_VERIFY_NOCACHE, SCRIPT_VERIFY_NONE, SCRIPT_VERIFY_P2SH, scriptcheckqueue, SER_DISK, CCoinsViewCache::SetBestBlock(), UpdateCoins(), CTransaction::vin, CBlock::vtx, CBlockUndo::vtxundo, CCheckQueueControl< T >::Wait(), CBlockTreeDB::WriteBlockIndex(), and CBlockTreeDB::WriteTxIndex().

Referenced by ConnectTip(), CreateNewBlock(), and VerifyDB().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool DisconnectBlock ( CBlock block,
CValidationState state,
CBlockIndex pindex,
CCoinsViewCache coins,
bool *  pfClean = NULL 
)

Functions for validating blocks and updating the block tree.

Undo the effects of this block (with given index) on the UTXO set represented by coins. In case pfClean is provided, operation will try to be tolerant about errors, and *pfClean will be true if no problems were found. Otherwise, the return value will be false in case of problems. Note that in any case, coins may be modified.

Definition at line 1638 of file main.cpp.

References CCoins::ClearUnspendable(), error(), CCoins::fCoinBase, CTxInUndo::fCoinBase, CCoinsViewCache::GetBestBlock(), CBlockIndex::GetBlockHash(), CCoinsViewCache::GetCoins(), CTransaction::GetHash(), CBlockIndex::GetUndoPos(), COutPoint::hash, CCoinsViewCache::HaveCoins(), CCoins::IsAvailable(), CDiskBlockPos::IsNull(), CCoins::IsPruned(), COutPoint::n, CCoins::nHeight, CTxInUndo::nHeight, CBlockIndex::nHeight, CCoins::nVersion, CTxInUndo::nVersion, CBlockIndex::pprev, CCoinsViewCache::SetBestBlock(), CCoinsViewCache::SetCoins(), CTxInUndo::txout, CTransaction::vin, CCoins::vout, CTxUndo::vprevout, CBlock::vtx, and CBlockUndo::vtxundo.

Referenced by DisconnectTip(), and VerifyDB().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int64_t GetBlockValue ( int  nHeight,
int64_t  nFees 
)

Definition at line 1218 of file main.cpp.

References COIN, Params(), and CChainParams::SubsidyHalvingInterval().

Referenced by ConnectBlock(), and CreateNewBlock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int GetLegacySigOpCount ( const CTransaction tx)

Count ECDSA signature operations the old-fashioned (pre-0.6) way.

Returns
number of sigops this transaction's outputs will produce when spent
See also
CTransaction::FetchInputs

Definition at line 677 of file main.cpp.

References CScript::GetSigOpCount(), CTxOut::scriptPubKey, CTxIn::scriptSig, CTransaction::vin, and CTransaction::vout.

Referenced by CheckBlock(), ConnectBlock(), and CreateNewBlock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int64_t GetMinFee ( const CTransaction tx,
unsigned int  nBytes,
bool  fAllowFree,
enum GetMinFee_mode  mode 
)

Definition at line 817 of file main.cpp.

References CENT, DEFAULT_BLOCK_PRIORITY_SIZE, GMF_RELAY, GMF_SEND, MAX_MONEY, MoneyRange(), CTransaction::nMinRelayTxFee, CTransaction::nMinTxFee, CTxOut::nValue, and CTransaction::vout.

Referenced by AcceptToMemoryPool(), and CoinControlDialog::updateLabels().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int GetNextWorkRequired ( const CBlockIndex pindexLast,
const CBlockHeader pblock 
)

debug print

Definition at line 1263 of file main.cpp.

References CBlockIndex::GetBlockTime(), CBigNum::GetCompact(), CBigNum::getuint256(), LogPrintf, CBlockIndex::nBits, CBlockIndex::nHeight, nTargetTimespan, CBlockHeader::nTime, CBlockIndex::nTime, Params(), CBlockIndex::pprev, CChainParams::ProofOfWorkLimit(), CBigNum::SetCompact(), TestNet(), and base_uint< BITS >::ToString().

Referenced by AcceptBlock(), CreateNewBlock(), and UpdateTime().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool GetNodeStateStats ( NodeId  nodeid,
CNodeStateStats stats 
)

Get statistics from node state.

Definition at line 327 of file main.cpp.

References LOCK, and CNodeStateStats::nMisbehavior.

Referenced by getpeerinfo().

+ Here is the caller graph for this function:

unsigned int GetP2SHSigOpCount ( const CTransaction tx,
CCoinsViewCache mapInputs 
)

Count ECDSA signature operations in pay-to-script-hash inputs.

Parameters
[in]mapInputsMap of previous transactions that have outputs we're spending
Returns
maximum number of sigops required to validate this transaction's inputs
See also
CTransaction::FetchInputs

Definition at line 691 of file main.cpp.

References CCoinsViewCache::GetOutputFor(), CScript::GetSigOpCount(), CTransaction::IsCoinBase(), CScript::IsPayToScriptHash(), CTxOut::scriptPubKey, and CTransaction::vin.

Referenced by ConnectBlock(), and CreateNewBlock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool GetTransaction ( const uint256 hash,
CTransaction tx,
uint256 hashBlock,
bool  fAllowSlow = false 
)

Retrieve a transaction (from memory pool, or from disk, if possible)

Definition at line 1049 of file main.cpp.

References CLIENT_VERSION, error(), fTxIndex, CBlockIndex::GetBlockHash(), CCoinsViewCache::GetCoins(), CTransaction::GetHash(), CBlockHeader::GetHash(), LOCK, CTxMemPool::lookup(), CCoins::nHeight, CDiskTxPos::nTxOffset, OpenBlockFile(), pcoinsTip, ReadBlockFromDisk(), CBlockTreeDB::ReadTxIndex(), SER_DISK, and CBlock::vtx.

Referenced by getactivecrowdsales_MP(), getcrowdsale_MP(), getrawtransaction(), getsto_MP(), gettrade_MP(), parseTransaction(), populateRPCTransactionObject(), and CMPTxList::setLastAlert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string GetWarnings ( std::string  strFor)

Format a string that describes several potential problems detected by the core.

Definition at line 3204 of file main.cpp.

References _(), CAlert::AppliesToMe(), CLIENT_VERSION_IS_RELEASE, cs_mapAlerts, GetBoolArg(), LOCK, mapAlerts, CUnsignedAlert::nPriority, PAIRTYPE, strMiscWarning, and CUnsignedAlert::strStatusBar.

Referenced by CRPCTable::execute(), getinfo(), getmininginfo(), and ClientModel::getStatusBarWarnings().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool InitBlockIndex ( )

Initialize a new block tree database + block data on disk.

Definition at line 3014 of file main.cpp.

References AddToBlockIndex(), CLIENT_VERSION, error(), FindBlockPos(), fReindex, fTxIndex, CChain::Genesis(), CChainParams::GenesisBlock(), GetBoolArg(), GetSerializeSize(), LOCK, LogPrintf, CBlockHeader::nTime, Params(), SER_DISK, WriteBlockToDisk(), and CBlockTreeDB::WriteFlag().

Referenced by AppInit2(), and ThreadImport().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CBlockIndex* InsertBlockIndex ( uint256  hash)

Create a new block index entry for a given block hash.

Definition at line 2848 of file main.cpp.

Referenced by CBlockTreeDB::LoadBlockIndexGuts().

+ Here is the caller graph for this function:

bool IsFinalTx ( const CTransaction tx,
int  nBlockHeight = 0,
int64_t  nBlockTime = 0 
)

Definition at line 594 of file main.cpp.

References AssertLockHeld, GetAdjustedTime(), CChain::Height(), LOCKTIME_THRESHOLD, CTransaction::nLockTime, and CTransaction::vin.

Referenced by AcceptBlock(), CWallet::AvailableCoins(), CreateNewBlock(), TransactionDesc::FormatTxStatus(), GetAccountBalance(), CWallet::GetAddressBalances(), getreceivedbyaccount(), getreceivedbyaddress(), CWallet::GetUnconfirmedBalance(), IsStandardTx(), CWalletTx::IsTrusted(), ListReceived(), and TransactionRecord::updateStatus().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool IsInitialBlockDownload ( )

Check whether we are doing an initial block download (synchronizing from disk or network)

Definition at line 1341 of file main.cpp.

References fImporting, fReindex, CBlockIndex::GetBlockTime(), GetTime(), Checkpoints::GetTotalBlocksEstimate(), CChain::Height(), LOCK, and CChain::Tip().

Referenced by ActivateBestChain(), CheckForkWarningConditions(), getblocktemplate(), ClientModel::inInitialBlockDownload(), ProcessMessage(), SendMessages(), UpdateTip(), WriteBlockToDisk(), and WriteChainState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool IsStandardTx ( const CTransaction tx,
std::string &  reason 
)

Check for standard transaction types.

Returns
True if all outputs (scriptPubKeys) use only standard transaction forms

Definition at line 507 of file main.cpp.

References AssertLockHeld, CTransaction::CURRENT_VERSION, CScript::HasCanonicalPushes(), CChain::Height(), CTxOut::IsDust(), IsFinalTx(), CScript::IsPushOnly(), IsStandard(), MAX_STANDARD_TX_SIZE, CTransaction::nMinRelayTxFee, CTransaction::nVersion, CTxOut::scriptPubKey, CTxIn::scriptSig, SER_NETWORK, TX_NULL_DATA, CTransaction::vin, and CTransaction::vout.

Referenced by AcceptToMemoryPool().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool LoadBlockIndex ( )

Load the block tree and coins database from disk.

Definition at line 3005 of file main.cpp.

References fReindex, and LoadBlockIndexDB().

Referenced by AppInit2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool LoadExternalBlockFile ( FILE *  fileIn,
CDiskBlockPos dbp = NULL 
)

Import blocks from an external file.

Definition at line 3118 of file main.cpp.

References _(), AbortNode(), CLIENT_VERSION, CBufferedFile::eof(), CBufferedFile::FindByte(), FLATDATA, CBufferedFile::GetPos(), GetTimeMillis(), CBufferedFile::good(), CValidationState::IsError(), LOCK, LogPrintf, MAX_BLOCK_SIZE, MESSAGE_START_SIZE, CDiskBlockPos::nFile, CDiskBlockPos::nPos, CBlockFileInfo::nSize, Params(), ProcessBlock(), CBlockTreeDB::ReadBlockFileInfo(), CBufferedFile::Seek(), SER_DISK, CBufferedFile::SetLimit(), and CBufferedFile::SetPos().

Referenced by ThreadImport().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Misbehaving ( NodeId  nodeid,
int  howmuch 
)

Increase a node's misbehavior score.

Definition at line 1441 of file main.cpp.

References GetArg(), and LogPrintf.

Referenced by InvalidBlockFound(), and ProcessMessage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FILE* OpenBlockFile ( const CDiskBlockPos pos,
bool  fReadOnly = false 
)

Open a block file (blk?????.dat)

Definition at line 2840 of file main.cpp.

References OpenDiskFile().

Referenced by FindBlockPos(), FlushBlockFile(), GetTransaction(), ReadBlockFromDisk(), ThreadImport(), and WriteBlockToDisk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FILE* OpenUndoFile ( const CDiskBlockPos pos,
bool  fReadOnly = false 
)

Open an undo file (rev?????.dat)

Definition at line 2844 of file main.cpp.

References OpenDiskFile().

Referenced by FindUndoPos(), and FlushBlockFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PrintBlockTree ( )

Print the loaded block tree.

Definition at line 3049 of file main.cpp.

References AssertLockHeld, DateTimeStrFormat(), CChain::Genesis(), CBlockIndex::GetBlockPos(), CBlockHeader::GetBlockTime(), LogPrintf, CChain::Next(), CDiskBlockPos::nFile, CBlockIndex::nHeight, CDiskBlockPos::nPos, CBlockIndex::pprev, ReadBlockFromDisk(), and CBlock::vtx.

Referenced by AppInit2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ProcessBlock ( CValidationState state,
CNode pfrom,
CBlock pblock,
CDiskBlockPos dbp = NULL 
)
bool ProcessMessages ( CNode pfrom)

Process protocol messages received from a given node.

Definition at line 4114 of file main.cpp.

References CDataStream::begin(), CNetMessage::complete(), CNode::fDisconnect, CMessageHeader::GetCommand(), Hash(), CNetMessage::hdr, CMessageHeader::IsValid(), LogPrintf, memcpy(), MESSAGE_START_SIZE, CMessageHeader::nChecksum, CMessageHeader::nMessageSize, CNode::nSendSize, Params(), CMessageHeader::pchMessageStart, PrintExceptionContinue(), ProcessGetData(), ProcessMessage(), CNode::PushMessage(), REJECT_MALFORMED, SendBufferSize(), CNetMessage::vRecv, CNode::vRecvGetData, and CNode::vRecvMsg.

Referenced by RegisterNodeSignals(), and UnregisterNodeSignals().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PushGetBlocks ( CNode pnode,
CBlockIndex pindexBegin,
uint256  hashEnd 
)

Definition at line 2530 of file main.cpp.

References AssertLockHeld, CChain::GetLocator(), CNode::hashLastGetBlocksEnd, CNode::pindexLastGetBlocksBegin, and CNode::PushMessage().

Referenced by ProcessBlock(), ProcessMessage(), and SendMessages().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ReadBlockFromDisk ( CBlock block,
const CDiskBlockPos pos 
)

Definition at line 1145 of file main.cpp.

References CheckProofOfWork(), CLIENT_VERSION, error(), CBlockHeader::GetHash(), CBlockHeader::nBits, OpenBlockFile(), and SER_DISK.

Referenced by AppInit2(), ConnectTip(), DisconnectTip(), getblock(), GetTransaction(), listblocktransactions_MP(), msc_initial_scan(), PrintBlockTree(), ProcessGetData(), ReadBlockFromDisk(), CWallet::ScanForWalletTransactions(), and VerifyDB().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ReadBlockFromDisk ( CBlock block,
const CBlockIndex pindex 
)

Definition at line 1169 of file main.cpp.

References error(), CBlockIndex::GetBlockHash(), CBlockIndex::GetBlockPos(), CBlockHeader::GetHash(), and ReadBlockFromDisk().

+ Here is the call graph for this function:

void RegisterNodeSignals ( CNodeSignals nodeSignals)

Register with a network node to receive its signals.

Definition at line 336 of file main.cpp.

References CNodeSignals::FinalizeNode, CNodeSignals::GetHeight, mastercore::GetHeight(), CNodeSignals::InitializeNode, CNodeSignals::ProcessMessages, ProcessMessages(), CNodeSignals::SendMessages, and SendMessages().

Referenced by AppInit2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RegisterWallet ( CWalletInterface pwalletIn)

Register a wallet to receive updates from core.

Definition at line 160 of file main.cpp.

References CWalletInterface::EraseFromWallet(), g_signals, CWalletInterface::Inventory(), CWalletInterface::ResendWalletTransactions(), CWalletInterface::SetBestChain(), CWalletInterface::SyncTransaction(), and CWalletInterface::UpdatedTransaction().

Referenced by AppInit2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool SendMessages ( CNode pto,
bool  fSendTrickle 
)
void SyncWithWallets ( const uint256 hash,
const CTransaction tx,
const CBlock pblock = NULL 
)

Push an updated transaction to all registered wallets.

Definition at line 187 of file main.cpp.

References g_signals.

Referenced by ConnectTip(), DisconnectTip(), and sendrawtransaction().

+ Here is the caller graph for this function:

void ThreadScriptCheck ( )

Run an instance of the script checking thread.

Definition at line 1753 of file main.cpp.

References RenameThread(), and scriptcheckqueue.

Referenced by AppInit2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UnloadBlockIndex ( )

Unload database information.

Definition at line 2997 of file main.cpp.

References CChain::SetTip().

Referenced by AppInit2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UnregisterAllWallets ( )

Unregister all wallets from core.

Definition at line 178 of file main.cpp.

References g_signals.

Referenced by Shutdown().

+ Here is the caller graph for this function:

void UnregisterNodeSignals ( CNodeSignals nodeSignals)

Unregister a network node.

Definition at line 345 of file main.cpp.

References CNodeSignals::FinalizeNode, CNodeSignals::GetHeight, mastercore::GetHeight(), CNodeSignals::InitializeNode, CNodeSignals::ProcessMessages, ProcessMessages(), CNodeSignals::SendMessages, and SendMessages().

Referenced by Shutdown().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UnregisterWallet ( CWalletInterface pwalletIn)

Unregister a wallet from core.

Definition at line 169 of file main.cpp.

References CWalletInterface::EraseFromWallet(), g_signals, CWalletInterface::Inventory(), CWalletInterface::ResendWalletTransactions(), CWalletInterface::SetBestChain(), CWalletInterface::SyncTransaction(), and CWalletInterface::UpdatedTransaction().

+ Here is the call graph for this function:

void UpdateCoins ( const CTransaction tx,
CValidationState state,
CCoinsViewCache inputs,
CTxUndo txundo,
int  nHeight,
const uint256 txhash 
)

Definition at line 1518 of file main.cpp.

References CCoinsViewCache::GetCoins(), COutPoint::hash, CTransaction::IsCoinBase(), CTxIn::prevout, CCoinsViewCache::SetCoins(), CCoins::Spend(), CTransaction::vin, and CTxUndo::vprevout.

Referenced by ConnectBlock(), and CreateNewBlock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UpdateTime ( CBlockHeader block,
const CBlockIndex pindexPrev 
)

Definition at line 1499 of file main.cpp.

References GetAdjustedTime(), CBlockIndex::GetMedianTimePast(), GetNextWorkRequired(), CBlockHeader::nBits, CBlockHeader::nTime, and TestNet().

Referenced by CreateNewBlock(), and getblocktemplate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool VerifyDB ( int  nCheckLevel,
int  nCheckDepth 
)

Verify consistency of the block and coin databases.

Definition at line 2923 of file main.cpp.

References CheckBlock(), ConnectBlock(), DisconnectBlock(), error(), CBlockIndex::GetBlockHash(), CCoinsViewCache::GetCacheSize(), CBlockIndex::GetUndoPos(), CChain::Height(), CDiskBlockPos::IsNull(), LOCK, LogPrintf, nCoinCacheSize, CChain::Next(), CBlockIndex::nHeight, CBlockIndex::pprev, ReadBlockFromDisk(), CChain::Tip(), base_uint< BITS >::ToString(), and CBlock::vtx.

Referenced by AppInit2(), and verifychain().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool VerifySignature ( const CCoins txFrom,
const CTransaction txTo,
unsigned int  nIn,
unsigned int  flags,
int  nHashType 
)

Verify a signature.

Definition at line 1544 of file main.cpp.

bool WriteBlockToDisk ( CBlock block,
CDiskBlockPos pos 
)

Functions for disk access for blocks.

Definition at line 1119 of file main.cpp.

References CLIENT_VERSION, error(), FileCommit(), fileout, FLATDATA, CAutoFile::GetSerializeSize(), IsInitialBlockDownload(), CDiskBlockPos::nPos, OpenBlockFile(), Params(), and SER_DISK.

Referenced by AcceptBlock(), and InitBlockIndex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const unsigned int BLOCK_DOWNLOAD_TIMEOUT = 60
static

Timeout in seconds before considering a block download peer unresponsive.

Definition at line 68 of file main.h.

Referenced by SendMessages().

const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000
static

The pre-allocation chunk size for blk?????.dat files (since 0.8)

Definition at line 54 of file main.h.

Referenced by FindBlockPos().

CChain chainActive
CChain chainMostWork

The currently best known chain of headers (some of which may be invalid).

Definition at line 49 of file main.cpp.

CScript COINBASE_FLAGS

Definition at line 80 of file main.cpp.

Referenced by getblocktemplate(), and IncrementExtraNonce().

const int COINBASE_MATURITY = 100
static

Coinbase transaction outputs can only be spent after this number of new blocks (network rule)

Definition at line 58 of file main.h.

Referenced by CheckInputs(), CMerkleTx::GetBlocksToMaturity(), and TransactionDesc::toHTML().

const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000
static

Default for -blockmaxsize and -blockminsize, which control the range of sizes the mining code will create.

Definition at line 39 of file main.h.

Referenced by CreateNewBlock(), and HelpMessage().

const unsigned int DEFAULT_BLOCK_MIN_SIZE = 0
static

Definition at line 40 of file main.h.

Referenced by CreateNewBlock().

const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 50000
static

Default for -blockprioritysize, maximum space for zero/low-fee transactions.

Definition at line 42 of file main.h.

Referenced by CreateNewBlock(), GetMinFee(), and HelpMessage().

const unsigned int DEFAULT_MAX_ORPHAN_BLOCKS = 750
static

Default for -maxorphanblocks, maximum number of orphan blocks kept in memory.

Definition at line 50 of file main.h.

Referenced by HelpMessage(), and PruneOrphanBlocks().

const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100
static

Default for -maxorphantx, maximum number of orphan transactions kept in memory.

Definition at line 48 of file main.h.

Referenced by HelpMessage(), and ProcessMessage().

const int DEFAULT_SCRIPTCHECK_THREADS = 0
static

-par default (number of script-checking threads, 0 = auto)

Definition at line 64 of file main.h.

Referenced by AppInit2(), HelpMessage(), and OptionsModel::Init().

bool fBenchmark

Definition at line 54 of file main.cpp.

Referenced by AppInit2(), ConnectBlock(), ConnectTip(), and DisconnectTip().

const int fHaveUPnP = false
static

Definition at line 73 of file main.h.

bool fImporting
bool fReindex
bool fTxIndex

Definition at line 55 of file main.cpp.

Referenced by AppInit2(), ConnectBlock(), GetTransaction(), InitBlockIndex(), and LoadBlockIndexDB().

const unsigned int LOCKTIME_THRESHOLD = 500000000
static

Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp.

Definition at line 60 of file main.h.

Referenced by TransactionDesc::FormatTxStatus(), IsFinalTx(), and TransactionRecord::updateStatus().

std::map<uint256, CBlockIndex*> mapBlockIndex
const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50
static

The maximum allowed number of signature check operations in a block (network rule)

Definition at line 46 of file main.h.

Referenced by CheckBlock(), ConnectBlock(), CreateNewBlock(), and getblocktemplate().

const unsigned int MAX_BLOCK_SIZE = 1000000
static

The maximum allowed size for a serialized block, in bytes (network rule)

Definition at line 37 of file main.h.

Referenced by CheckBlock(), CheckTransaction(), CreateNewBlock(), CPartialMerkleTree::ExtractMatches(), getblocktemplate(), and LoadExternalBlockFile().

const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000
static

The maximum size of a blk?????.dat file (since 0.8)

Definition at line 52 of file main.h.

Referenced by FindBlockPos().

const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 128
static

Number of blocks that can be requested at any given time from a single peer.

Definition at line 66 of file main.h.

Referenced by SendMessages().

const int MAX_SCRIPTCHECK_THREADS = 16
static

Maximum number of script-checking threads allowed.

Definition at line 62 of file main.h.

Referenced by AppInit2(), HelpMessage(), and OptionsDialog::OptionsDialog().

const unsigned int MAX_STANDARD_TX_SIZE = 100000
static

The maximum size for transactions we're willing to relay/mine.

Definition at line 44 of file main.h.

Referenced by IsStandardTx().

CTxMemPool mempool
unsigned int nCoinCacheSize

Definition at line 56 of file main.cpp.

Referenced by AppInit2(), VerifyDB(), and WriteChainState().

uint64_t nLastBlockSize

Definition at line 81 of file miner.cpp.

Referenced by CreateNewBlock(), and getmininginfo().

uint64_t nLastBlockTx

Definition at line 80 of file miner.cpp.

Referenced by CreateNewBlock(), and getmininginfo().

const uint64_t nMinDiskSpace = 52428800
static

Definition at line 103 of file main.h.

Referenced by CheckDiskSpace().

int nScriptCheckThreads

Definition at line 51 of file main.cpp.

Referenced by AppInit2().

int64_t nTimeBestReceived

Definition at line 50 of file main.cpp.

Referenced by CWallet::ResendWalletTransactions(), and UpdateTip().

CBlockTreeDB* pblocktree

Global variable that points to the active block tree (protected by cs_main)

Definition at line 414 of file main.cpp.

Referenced by AppInit2(), Shutdown(), and ThreadImport().

CCoinsViewCache* pcoinsTip

Global variable that points to the active CCoinsView (protected by cs_main)

Definition at line 413 of file main.cpp.

Referenced by AppInit2(), CreateNewBlock(), GetTransaction(), gettxout(), gettxoutsetinfo(), sendrawtransaction(), Shutdown(), signrawtransaction(), and TransactionDesc::toHTML().

const unsigned char REJECT_CHECKPOINT = 0x43
static

Definition at line 84 of file main.h.

Referenced by AcceptBlock(), and ProcessBlock().

const unsigned char REJECT_DUPLICATE = 0x12
static

Definition at line 80 of file main.h.

Referenced by AcceptToMemoryPool(), and ProcessMessage().

const unsigned char REJECT_DUST = 0x41
static

Definition at line 82 of file main.h.

const unsigned char REJECT_INSUFFICIENTFEE = 0x42
static

Definition at line 83 of file main.h.

Referenced by AcceptToMemoryPool().

const unsigned char REJECT_INVALID = 0x10
static
const unsigned char REJECT_MALFORMED = 0x01
static

"reject" message codes

Definition at line 77 of file main.h.

Referenced by ProcessMessages().

const unsigned char REJECT_NONSTANDARD = 0x40
static

Definition at line 81 of file main.h.

Referenced by AcceptToMemoryPool(), and CheckInputs().

const unsigned char REJECT_OBSOLETE = 0x11
static

Definition at line 79 of file main.h.

Referenced by AcceptBlock(), and ProcessMessage().

const std::string strMessageMagic
const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000
static

The pre-allocation chunk size for rev?????.dat files (since 0.8)

Definition at line 56 of file main.h.

Referenced by FindUndoPos().