![]() |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
#include "main.h"#include "addrman.h"#include "amount.h"#include "blocksignature.h"#include "chainparams.h"#include "checkpoints.h"#include "checkqueue.h"#include "consensus/merkle.h"#include "consensus/tx_verify.h"#include "consensus/validation.h"#include "fs.h"#include "init.h"#include "invalid.h"#include "kernel.h"#include "masternode-budget.h"#include "masternode-payments.h"#include "masternode-sync.h"#include "masternodeman.h"#include "merkleblock.h"#include "net.h"#include "poa.h"#include "swifttx.h"#include "txdb.h"#include "txmempool.h"#include "guiinterface.h"#include "util.h"#include "utilmoneystr.h"#include "validationinterface.h"#include <sstream>#include <boost/algorithm/string/replace.hpp>#include <boost/foreach.hpp>#include <boost/thread.hpp>Go to the source code of this file.
Classes | |
| struct | COrphanTx |
| class | CMainCleanup |
Enumerations | |
| enum | FlushStateMode { FLUSH_STATE_IF_NEEDED, FLUSH_STATE_PERIODIC, FLUSH_STATE_ALWAYS } |
Functions | |
| void | EraseOrphansFor (NodeId peer) |
| CAmount | GetValueIn (CCoinsViewCache view, const CTransaction &tx) |
| double | GetPriority (const CTransaction &tx, int nHeight) |
| Return priority of tx at height nHeight. More... | |
| bool | IsSpentKeyImage (const std::string &kiHex, const uint256 &againsHash) |
| bool | CheckKeyImageSpendInMainChain (const std::string &kiHex, int &confirmations) |
| secp256k1_context2 * | GetContext () |
| secp256k1_scratch_space2 * | GetScratch () |
| secp256k1_bulletproof_generators * | GetGenerator () |
| void | DestroyContext () |
| bool | VerifyBulletProofAggregate (const CTransaction &tx) |
| bool | VerifyRingSignatureWithTxFee (const CTransaction &tx, CBlockIndex *pindex) |
| bool | ReVerifyPoSBlock (CBlockIndex *pindex) |
| uint256 | GetTxSignatureHash (const CTransaction &tx) |
| uint256 | GetTxInSignatureHash (const CTxIn &txin) |
| bool | GetNodeStateStats (NodeId nodeid, CNodeStateStats &stats) |
| Get statistics from node state. More... | |
| void | RegisterNodeSignals (CNodeSignals &nodeSignals) |
| Register with a network node to receive its signals. More... | |
| void | UnregisterNodeSignals (CNodeSignals &nodeSignals) |
| Unregister a network node. More... | |
| CBlockIndex * | FindForkInGlobalIndex (const CChain &chain, const CBlockLocator &locator) |
| Find the last common block between the parameter chain and a locator. More... | |
| bool | AddOrphanTx (const CTransaction &tx, NodeId peer) |
| unsigned int | LimitOrphanTxSize (unsigned int nMaxOrphans) |
| bool | IsStandardTx (const CTransaction &tx, std::string &reason) |
| Check for standard transaction types. More... | |
| bool | AreInputsStandard (const CTransaction &tx, const CCoinsViewCache &mapInputs) |
| Check transaction inputs to mitigate two potential denial-of-service attacks: More... | |
| int | GetInputAge (CTxIn &vin) |
| int | GetIXConfirmations (uint256 nTXHash) |
| bool | VerifyShnorrKeyImageTxIn (const CTxIn &txin, uint256 ctsHash) |
| bool | VerifyShnorrKeyImageTx (const CTransaction &tx) |
| bool | CheckFinalTx (const CTransaction &tx, int flags) |
| Check if transaction will be final in the next block to be created. More... | |
| CAmount | GetMinRelayFee (const CTransaction &tx, unsigned int nBytes, bool fAllowFree) |
| bool | CheckHaveInputs (const CCoinsViewCache &view, const CTransaction &tx) |
| Find the best known block, and make it the tip of the block chain. More... | |
| bool | AcceptToMemoryPool (CTxMemPool &pool, CValidationState &state, const CTransaction &tx, bool fLimitFree, bool *pfMissingInputs, bool fRejectInsaneFee, bool ignoreFees) |
| (try to) add transaction to memory pool More... | |
| bool | AcceptableInputs (CTxMemPool &pool, CValidationState &state, const CTransaction &tx, bool fLimitFree, bool *pfMissingInputs, bool fRejectInsaneFee, bool isDSTX) |
| bool | GetTransaction (const uint256 &hash, CTransaction &txOut, uint256 &hashBlock, bool fAllowSlow, CBlockIndex *blockIndex) |
| Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock. More... | |
| 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) |
| double | ConvertBitsToDouble (unsigned int nBits) |
| CAmount | GetBlockValue (int nHeight) |
| CAmount | GetSeeSaw (const CAmount &blockValue, int nMasternodeCount, int nHeight) |
| int64_t | GetMasternodePayment (int nHeight, int64_t blockValue, int nMasternodeCount) |
| void | SetRingSize (int nHeight) |
| bool | IsInitialBlockDownload () |
| Check whether we are doing an initial block download (synchronizing from disk or network) More... | |
| bool | VerifyZeroBlindCommitment (const CTxOut &out) |
| bool | VerifyDerivedAddress (const CTxOut &out, std::string stealth) |
| void | CheckForkWarningConditions () |
| void | CheckForkWarningConditionsOnNewFork (CBlockIndex *pindexNewForkTip) |
| void | Misbehaving (NodeId pnode, int howmuch) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Increase a node's misbehavior score. More... | |
| void | UpdateCoins (const CTransaction &tx, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight) |
| Apply the effects of this transaction on the UTXO set represented by view. More... | |
| bool | ValidOutPoint (const COutPoint out, int nHeight) |
| CAmount | GetInvalidUTXOValue () |
| bool | CheckInputs (const CTransaction &tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, bool cacheStore, std::vector< CScriptCheck > *pvChecks) |
| Check whether all inputs of this transaction are valid (no double spends, scripts & sigs, amounts) This does not modify the UTXO set. More... | |
| bool | DisconnectBlock (CBlock &block, CValidationState &state, CBlockIndex *pindex, CCoinsViewCache &view, bool *pfClean) |
| Functions for validating blocks and updating the block tree. More... | |
| bool | FindUndoPos (CValidationState &state, int nFile, CDiskBlockPos &pos, unsigned int nAddSize) |
| void | ThreadScriptCheck () |
| Run an instance of the script checking thread. More... | |
| bool | RecalculatePRCYSupply (int nHeightStart) |
| bool | ConnectBlock (const CBlock &block, CValidationState &state, CBlockIndex *pindex, CCoinsViewCache &view, bool fJustCheck, bool fAlreadyChecked) |
| Apply the effects of this block (with given index) on the UTXO set represented by coins. More... | |
| void | FlushStateToDisk () |
| Flush all state, indexes and buffers to disk. More... | |
| bool | DisconnectBlocks (int nBlocks) |
| Reprocess a number of blocks to try and get on the correct chain again. More... | |
| void | ReprocessBlocks (int nBlocks) |
| void | RemoveInvalidTransactionsFromMempool () |
| bool | ActivateBestChain (CValidationState &state, CBlock *pblock, bool fAlreadyChecked) |
| Make the best chain active, in multiple steps. More... | |
| bool | InvalidateBlock (CValidationState &state, CBlockIndex *pindex) |
| Mark a block as invalid. More... | |
| bool | ReconsiderBlock (CValidationState &state, CBlockIndex *pindex) |
| Remove invalidity status from a block and its descendants. More... | |
| CBlockIndex * | AddToBlockIndex (const CBlock &block) |
| bool | ReceivedBlockTransactions (const CBlock &block, CValidationState &state, CBlockIndex *pindexNew, const CDiskBlockPos &pos) |
| Mark a block as having its data received and checked (up to BLOCK_VALID_TRANSACTIONS). More... | |
| bool | FindBlockPos (CValidationState &state, CDiskBlockPos &pos, unsigned int nAddSize, unsigned int nHeight, uint64_t nTime, bool fKnown=false) |
| bool | CheckBlockHeader (const CBlockHeader &block, CValidationState &state, bool fCheckPOW) |
| Context-independent validity checks. More... | |
| bool | CheckBlock (const CBlock &block, CValidationState &state, bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckSig) |
| bool | CheckWork (const CBlock block, CBlockIndex *const pindexPrev) |
| bool | ContextualCheckBlockHeader (const CBlockHeader &block, CValidationState &state, CBlockIndex *const pindexPrev) |
| Context-dependent validity checks. More... | |
| bool | IsBlockHashInChain (const uint256 &hashBlock) |
| bool | IsTransactionInChain (const uint256 &txId, int &nHeightTx, CTransaction &tx) |
| Context-independent validity checks. More... | |
| bool | IsTransactionInChain (const uint256 &txId, int &nHeightTx) |
| bool | ContextualCheckBlock (const CBlock &block, CValidationState &state, CBlockIndex *const pindexPrev) |
| bool | AcceptBlockHeader (const CBlock &block, CValidationState &state, CBlockIndex **ppindex) |
| bool | AcceptBlock (CBlock &block, CValidationState &state, CBlockIndex **ppindex, CDiskBlockPos *dbp, bool fAlreadyCheckedBlock) |
| Store block on disk. More... | |
| bool | ProcessNewBlock (CValidationState &state, CNode *pfrom, CBlock *pblock, CDiskBlockPos *dbp) |
| Process an incoming block. More... | |
| bool | TestBlockValidity (CValidationState &state, const CBlock &block, CBlockIndex *const pindexPrev, bool fCheckPOW, bool fCheckMerkleRoot) |
| Check a block is completely valid from start to finish (only works on top of our current best block, with cs_main held) More... | |
| bool | CheckDiskSpace (uint64_t nAdditionalBytes) |
| Check whether enough disk space is available for an incoming block. More... | |
| FILE * | OpenDiskFile (const CDiskBlockPos &pos, const char *prefix, bool fReadOnly) |
| FILE * | OpenBlockFile (const CDiskBlockPos &pos, bool fReadOnly) |
| Open a block file (blk?????.dat) More... | |
| FILE * | OpenUndoFile (const CDiskBlockPos &pos, bool fReadOnly) |
| Open an undo file (rev?????.dat) More... | |
| fs::path | GetBlockPosFilename (const CDiskBlockPos &pos, const char *prefix) |
| Translation to a filesystem path. More... | |
| CBlockIndex * | InsertBlockIndex (uint256 hash) |
| Create a new block index entry for a given block hash. More... | |
| void | UnloadBlockIndex () |
| Unload database information. More... | |
| bool | LoadBlockIndex (std::string &strError) |
| Load the block tree and coins database from disk. More... | |
| bool | InitBlockIndex () |
| Initialize a new block tree database + block data on disk. More... | |
| bool | LoadExternalBlockFile (FILE *fileIn, CDiskBlockPos *dbp) |
| Import blocks from an external file. More... | |
| std::string | GetWarnings (std::string strFor) |
| Format a string that describes several potential problems detected by the core. More... | |
| int | ActiveProtocol () |
| See whether the protocol update is enforced for connected nodes. More... | |
| bool | ProcessMessages (CNode *pfrom) |
| Process protocol messages received from a given node. More... | |
| bool | SendMessages (CNode *pto) |
| Send queued protocol messages to be sent to a give node. More... | |
Variables | |
| RecursiveMutex | cs_main |
| Global state. More... | |
| BlockMap | mapBlockIndex |
| std::map< uint256, uint256 > | mapProofOfStake |
| std::map< unsigned int, unsigned int > | mapHashedBlocks |
| CChain | chainActive |
| The currently-connected chain of blocks. More... | |
| CBlockIndex * | pindexBestHeader = NULL |
| Best header we've seen so far (used for getheaders queries' starting points). More... | |
| int64_t | nTimeBestReceived = 0 |
| Mutex | g_best_block_mutex |
| std::condition_variable | g_best_block_cv |
| uint256 | g_best_block |
| int | nScriptCheckThreads = 0 |
| std::atomic< bool > | fImporting {false} |
| std::atomic< bool > | fReindex {false} |
| bool | fTxIndex = true |
| bool | fIsBareMultisigStd = true |
| bool | fCheckBlockIndex = false |
| bool | fVerifyingBlocks = false |
| size_t | nCoinCacheUsage = 5000 * 300 |
| int64_t | nMaxTipAge = DEFAULT_MAX_TIP_AGE |
| int | MIN_RING_SIZE |
| int | MAX_RING_SIZE |
| const int | MAX_TX_INPUTS = 50 |
| const int | MIN_TX_INPUTS_FOR_SWEEPING = 25 |
| CFeeRate | minRelayTxFee = CFeeRate(10000) |
| Fees smaller than this (in duffs) are considered zero fee (for relaying and mining) We are ~100 times smaller then bitcoin now (2015-06-23), set minRelayTxFee only 10 times higher so it's still 10 times lower comparing to bitcoin. More... | |
| CTxMemPool | mempool (::minRelayTxFee) |
| std::map< uint256, COrphanTx > | mapOrphanTransactions |
| std::map< uint256, std::set< uint256 > > | mapOrphanTransactionsByPrev |
| std::map< uint256, int64_t > | mapRejectedBlocks |
| CScript | COINBASE_FLAGS |
| Constant stuff for coinbase transactions we create: More... | |
| const std::string | strMessageMagic = "DarkNet Signed Message:\n" |
| CCoinsViewCache * | pcoinsTip = NULL |
| Global variable that points to the active CCoinsView (protected by cs_main) More... | |
| CBlockTreeDB * | pblocktree = NULL |
| Global variable that points to the active block tree (protected by cs_main) More... | |
| bool | fLargeWorkForkFound = false |
| bool | fLargeWorkInvalidChainFound = false |
| CBlockIndex * | pindexBestForkTip = NULL |
| CBlockIndex * | pindexBestForkBase = NULL |
| std::map< COutPoint, COutPoint > | mapInvalidOutPoints |
| CAmount | nFilteredThroughBittrex = 0 |
| bool | fListPopulatedAfterLock = false |
| enum FlushStateMode |
| bool AcceptableInputs | ( | CTxMemPool & | pool, |
| CValidationState & | state, | ||
| const CTransaction & | tx, | ||
| bool | fLimitFree, | ||
| bool * | pfMissingInputs, | ||
| bool | fRejectInsaneFee, | ||
| bool | isDSTX | ||
| ) |
| bool AcceptBlock | ( | CBlock & | block, |
| CValidationState & | state, | ||
| CBlockIndex ** | pindex, | ||
| CDiskBlockPos * | dbp = NULL, |
||
| bool | fAlreadyCheckedBlock = false |
||
| ) |
| bool AcceptBlockHeader | ( | const CBlock & | block, |
| CValidationState & | state, | ||
| CBlockIndex ** | ppindex | ||
| ) |
| bool AcceptToMemoryPool | ( | CTxMemPool & | pool, |
| CValidationState & | state, | ||
| const CTransaction & | tx, | ||
| bool | fLimitFree, | ||
| bool * | pfMissingInputs, | ||
| bool | fRejectInsaneFee, | ||
| bool | ignoreFees | ||
| ) |
| bool ActivateBestChain | ( | CValidationState & | state, |
| CBlock * | pblock, | ||
| bool | fAlreadyChecked | ||
| ) |
Make the best chain active, in multiple steps.
The result is either failure or an activated best chain. pblock is either NULL or a pointer to a block that is already loaded (to avoid loading it again from disk).
Definition at line 3892 of file main.cpp.
| int ActiveProtocol | ( | ) |
| bool AddOrphanTx | ( | const CTransaction & | tx, |
| NodeId | peer | ||
| ) |
| CBlockIndex* AddToBlockIndex | ( | const CBlock & | block | ) |
| bool AreInputsStandard | ( | const CTransaction & | tx, |
| const CCoinsViewCache & | mapInputs | ||
| ) |
Check transaction inputs to mitigate two potential denial-of-service attacks:
Check transaction inputs, and make sure any pay-to-script-hash transactions are evaluating IsStandard scripts.
Definition at line 1309 of file main.cpp.
| bool CheckBlock | ( | const CBlock & | block, |
| CValidationState & | state, | ||
| bool | fCheckPOW, | ||
| bool | fCheckMerkleRoot, | ||
| bool | fCheckSig | ||
| ) |
| bool CheckBlockHeader | ( | const CBlockHeader & | block, |
| CValidationState & | state, | ||
| bool | fCheckPOW | ||
| ) |
| bool CheckDiskSpace | ( | uint64_t | nAdditionalBytes | ) |
| bool CheckFinalTx | ( | const CTransaction & | tx, |
| int | flags = -1 |
||
| ) |
Check if transaction will be final in the next block to be created.
Calls IsFinalTx() with current block height and appropriate block time.
See consensus/consensus.h for flag definitions.
Definition at line 1465 of file main.cpp.
| void CheckForkWarningConditions | ( | ) |
| void CheckForkWarningConditionsOnNewFork | ( | CBlockIndex * | pindexNewForkTip | ) |
| bool CheckHaveInputs | ( | const CCoinsViewCache & | view, |
| const CTransaction & | tx | ||
| ) |
| bool CheckInputs | ( | const CTransaction & | tx, |
| CValidationState & | state, | ||
| const CCoinsViewCache & | view, | ||
| bool | fScriptChecks, | ||
| unsigned int | flags, | ||
| bool | cacheStore, | ||
| std::vector< CScriptCheck > * | pvChecks = NULL |
||
| ) |
Check whether all inputs of this transaction are valid (no double spends, scripts & sigs, amounts) This does not modify the UTXO set.
If pvChecks is not NULL, script checks are pushed onto it instead of being performed inline.
Definition at line 2766 of file main.cpp.
| bool CheckKeyImageSpendInMainChain | ( | const std::string & | kiHex, |
| int & | confirmations | ||
| ) |
| bool CheckWork | ( | const CBlock | block, |
| CBlockIndex *const | pindexPrev | ||
| ) |
| bool ConnectBlock | ( | const CBlock & | block, |
| CValidationState & | state, | ||
| CBlockIndex * | pindex, | ||
| CCoinsViewCache & | view, | ||
| bool | fJustCheck, | ||
| bool | fAlreadyChecked | ||
| ) |
| bool ContextualCheckBlock | ( | const CBlock & | block, |
| CValidationState & | state, | ||
| CBlockIndex *const | pindexPrev | ||
| ) |
| bool ContextualCheckBlockHeader | ( | const CBlockHeader & | block, |
| CValidationState & | state, | ||
| CBlockIndex *const | pindexPrev | ||
| ) |
| double ConvertBitsToDouble | ( | unsigned int | nBits | ) |
| void DestroyContext | ( | ) |
| 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 2877 of file main.cpp.
| bool DisconnectBlocks | ( | int | nBlocks | ) |
| bool FindBlockPos | ( | CValidationState & | state, |
| CDiskBlockPos & | pos, | ||
| unsigned int | nAddSize, | ||
| unsigned int | nHeight, | ||
| uint64_t | nTime, | ||
| bool | fKnown = false |
||
| ) |
| CBlockIndex* FindForkInGlobalIndex | ( | const CChain & | chain, |
| const CBlockLocator & | locator | ||
| ) |
| bool FindUndoPos | ( | CValidationState & | state, |
| int | nFile, | ||
| CDiskBlockPos & | pos, | ||
| unsigned int | nAddSize | ||
| ) |
| void FlushStateToDisk | ( | ) |
| fs::path GetBlockPosFilename | ( | const CDiskBlockPos & | pos, |
| const char * | prefix | ||
| ) |
| CAmount GetBlockValue | ( | int | nHeight | ) |
| secp256k1_context2* GetContext | ( | ) |
| secp256k1_bulletproof_generators* GetGenerator | ( | ) |
| int GetInputAge | ( | CTxIn & | vin | ) |
| CAmount GetInvalidUTXOValue | ( | ) |
| int GetIXConfirmations | ( | uint256 | nTXHash | ) |
| int64_t GetMasternodePayment | ( | int | nHeight, |
| int64_t | blockValue, | ||
| int | nMasternodeCount | ||
| ) |
| CAmount GetMinRelayFee | ( | const CTransaction & | tx, |
| unsigned int | nBytes, | ||
| bool | fAllowFree | ||
| ) |
| bool GetNodeStateStats | ( | NodeId | nodeid, |
| CNodeStateStats & | stats | ||
| ) |
| double GetPriority | ( | const CTransaction & | tx, |
| int | nHeight | ||
| ) |
| secp256k1_scratch_space2* GetScratch | ( | ) |
| bool GetTransaction | ( | const uint256 & | hash, |
| CTransaction & | txOut, | ||
| uint256 & | hashBlock, | ||
| bool | fAllowSlow, | ||
| CBlockIndex * | blockIndex | ||
| ) |
| uint256 GetTxSignatureHash | ( | const CTransaction & | tx | ) |
| CAmount GetValueIn | ( | CCoinsViewCache | view, |
| const CTransaction & | tx | ||
| ) |
| std::string GetWarnings | ( | std::string | strFor | ) |
| bool InitBlockIndex | ( | ) |
| CBlockIndex* InsertBlockIndex | ( | uint256 | hash | ) |
| bool InvalidateBlock | ( | CValidationState & | state, |
| CBlockIndex * | pindex | ||
| ) |
| bool IsBlockHashInChain | ( | const uint256 & | hashBlock | ) |
| bool IsInitialBlockDownload | ( | ) |
| bool IsSpentKeyImage | ( | const std::string & | kiHex, |
| const uint256 & | againsHash | ||
| ) |
| bool IsStandardTx | ( | const CTransaction & | tx, |
| std::string & | reason | ||
| ) |
| bool IsTransactionInChain | ( | const uint256 & | txId, |
| int & | nHeightTx | ||
| ) |
| bool IsTransactionInChain | ( | const uint256 & | txId, |
| int & | nHeightTx, | ||
| CTransaction & | tx | ||
| ) |
| unsigned int LimitOrphanTxSize | ( | unsigned int | nMaxOrphans | ) |
| bool LoadBlockIndex | ( | std::string & | strError | ) |
| bool LoadExternalBlockFile | ( | FILE * | fileIn, |
| CDiskBlockPos * | dbp | ||
| ) |
| void Misbehaving | ( | NodeId | pnode, |
| int | howmuch | ||
| ) |
| FILE* OpenBlockFile | ( | const CDiskBlockPos & | pos, |
| bool | fReadOnly | ||
| ) |
| FILE* OpenDiskFile | ( | const CDiskBlockPos & | pos, |
| const char * | prefix, | ||
| bool | fReadOnly | ||
| ) |
| FILE* OpenUndoFile | ( | const CDiskBlockPos & | pos, |
| bool | fReadOnly | ||
| ) |
| bool ProcessMessages | ( | CNode * | pfrom | ) |
| bool ProcessNewBlock | ( | CValidationState & | state, |
| CNode * | pfrom, | ||
| CBlock * | pblock, | ||
| CDiskBlockPos * | dbp = NULL |
||
| ) |
Process an incoming block.
This only returns after the best known valid block is made active. Note that it does not, however, guarantee that the specific block passed to it has been checked for validity!
| [out] | state | This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganisation; or it may be set to an Invalid state if pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to possibly get feedback on whether pblock is valid, you must also install a CValidationInterface - this will have its BlockChecked method called whenever any block completes validation. |
| [in] | pfrom | The node which we are receiving the block from; it is added to mapBlockSource and may be penalised if the block is invalid. |
| [in] | pblock | The block we want to process. |
| [out] | dbp | If pblock is stored to disk (or already there), this will be set to its location. |
Definition at line 4890 of file main.cpp.
| bool ReadBlockFromDisk | ( | CBlock & | block, |
| const CBlockIndex * | pindex | ||
| ) |
| bool ReadBlockFromDisk | ( | CBlock & | block, |
| const CDiskBlockPos & | pos | ||
| ) |
| bool RecalculatePRCYSupply | ( | int | nHeightStart | ) |
| bool ReceivedBlockTransactions | ( | const CBlock & | block, |
| CValidationState & | state, | ||
| CBlockIndex * | pindexNew, | ||
| const CDiskBlockPos & | pos | ||
| ) |
| bool ReconsiderBlock | ( | CValidationState & | state, |
| CBlockIndex * | pindex | ||
| ) |
| void RegisterNodeSignals | ( | CNodeSignals & | nodeSignals | ) |
| void RemoveInvalidTransactionsFromMempool | ( | ) |
| void ReprocessBlocks | ( | int | nBlocks | ) |
| bool ReVerifyPoSBlock | ( | CBlockIndex * | pindex | ) |
| bool SendMessages | ( | CNode * | pto | ) |
| void SetRingSize | ( | int | nHeight | ) |
| bool TestBlockValidity | ( | CValidationState & | state, |
| const CBlock & | block, | ||
| CBlockIndex *const | pindexPrev, | ||
| bool | fCheckPOW, | ||
| bool | fCheckMerkleRoot | ||
| ) |
| void ThreadScriptCheck | ( | ) |
| void UnloadBlockIndex | ( | ) |
| void UnregisterNodeSignals | ( | CNodeSignals & | nodeSignals | ) |
| void UpdateCoins | ( | const CTransaction & | tx, |
| CCoinsViewCache & | inputs, | ||
| CTxUndo & | txundo, | ||
| int | nHeight | ||
| ) |
| bool ValidOutPoint | ( | const COutPoint | out, |
| int | nHeight | ||
| ) |
| bool VerifyBulletProofAggregate | ( | const CTransaction & | tx | ) |
| bool VerifyDerivedAddress | ( | const CTxOut & | out, |
| std::string | stealth | ||
| ) |
| bool VerifyRingSignatureWithTxFee | ( | const CTransaction & | tx, |
| CBlockIndex * | pindex | ||
| ) |
| bool VerifyShnorrKeyImageTx | ( | const CTransaction & | tx | ) |
| bool VerifyZeroBlindCommitment | ( | const CTxOut & | out | ) |
| bool WriteBlockToDisk | ( | CBlock & | block, |
| CDiskBlockPos & | pos | ||
| ) |
| CScript COINBASE_FLAGS |
| RecursiveMutex cs_main |
Global state.
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
This may also need to be locked when updating the transaction pool, e.g. on AcceptToMemoryPool. See CTxMemPool::cs comment for details.
The transaction pool has a separate lock to allow reading from it and the chainstate at the same time.
| CTxMemPool mempool(::minRelayTxFee) |
| CBlockTreeDB* pblocktree = NULL |
| CCoinsViewCache* pcoinsTip = NULL |
Global variable that points to the active CCoinsView (protected by cs_main)
| CBlockIndex * pindexBestForkBase = NULL |
| CBlockIndex* pindexBestForkTip = NULL |
| CBlockIndex* pindexBestHeader = NULL |
1.8.17