Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 465 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* (try to) add transaction to memory pool | * (try to) add transaction to memory pool | ||||
*/ | */ | ||||
bool AcceptToMemoryPool(const Config &config, CTxMemPool &pool, | bool AcceptToMemoryPool(const Config &config, CTxMemPool &pool, | ||||
CValidationState &state, const CTransactionRef &tx, | CValidationState &state, const CTransactionRef &tx, | ||||
bool fLimitFree, bool *pfMissingInputs, | bool fLimitFree, bool *pfMissingInputs, | ||||
bool fOverrideMempoolLimit = false, | bool fOverrideMempoolLimit = false, | ||||
const Amount nAbsurdFee = Amount::zero(), | const Amount nAbsurdFee = Amount::zero(), | ||||
bool test_accept = false); | bool test_accept = false) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
/** Convert CValidationState to a human-readable message for logging */ | /** Convert CValidationState to a human-readable message for logging */ | ||||
std::string FormatStateMessage(const CValidationState &state); | std::string FormatStateMessage(const CValidationState &state); | ||||
/** | /** | ||||
* Check whether all inputs of this transaction are valid (no double spends, | * Check whether all inputs of this transaction are valid (no double spends, | ||||
* scripts & sigs, amounts). This does not modify the UTXO set. | * scripts & sigs, amounts). This does not modify the UTXO set. | ||||
* | * | ||||
Show All 24 Lines | |||||
void UpdateCoins(CCoinsViewCache &view, const CTransaction &tx, int nHeight); | void UpdateCoins(CCoinsViewCache &view, const CTransaction &tx, int nHeight); | ||||
void UpdateCoins(CCoinsViewCache &view, const CTransaction &tx, CTxUndo &txundo, | void UpdateCoins(CCoinsViewCache &view, const CTransaction &tx, CTxUndo &txundo, | ||||
int nHeight); | int nHeight); | ||||
/** | /** | ||||
* Test whether the LockPoints height and time are still valid on the current | * Test whether the LockPoints height and time are still valid on the current | ||||
* chain. | * chain. | ||||
*/ | */ | ||||
bool TestLockPointValidity(const LockPoints *lp); | bool TestLockPointValidity(const LockPoints *lp) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
/** | /** | ||||
* Check if transaction will be BIP 68 final in the next block to be created. | * Check if transaction will be BIP 68 final in the next block to be created. | ||||
* | * | ||||
* Simulates calling SequenceLocks() with data from the tip of the current | * Simulates calling SequenceLocks() with data from the tip of the current | ||||
* active chain. Optionally stores in LockPoints the resulting height and time | * active chain. Optionally stores in LockPoints the resulting height and time | ||||
* calculated and the hash of the block needed for calculation or skips the | * calculated and the hash of the block needed for calculation or skips the | ||||
* calculation and uses the LockPoints passed in for evaluation. The LockPoints | * calculation and uses the LockPoints passed in for evaluation. The LockPoints | ||||
* should not be considered valid if CheckSequenceLocks returns false. | * should not be considered valid if CheckSequenceLocks returns false. | ||||
* | * | ||||
* See consensus/consensus.h for flag definitions. | * See consensus/consensus.h for flag definitions. | ||||
*/ | */ | ||||
bool CheckSequenceLocks(const CTransaction &tx, int flags, | bool CheckSequenceLocks(const CTransaction &tx, int flags, | ||||
LockPoints *lp = nullptr, | LockPoints *lp = nullptr, | ||||
bool useExistingLockPoints = false); | bool useExistingLockPoints = false) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
/** | /** | ||||
* Closure representing one script verification. | * Closure representing one script verification. | ||||
* Note that this stores references to the spending transaction. | * Note that this stores references to the spending transaction. | ||||
*/ | */ | ||||
class CScriptCheck { | class CScriptCheck { | ||||
private: | private: | ||||
CScript scriptPubKey; | CScript scriptPubKey; | ||||
▲ Show 20 Lines • Show All 197 Lines • Show Last 20 Lines |