Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | |||||
static void FindFilesToPruneManual(std::set<int> &setFilesToPrune, | static void FindFilesToPruneManual(std::set<int> &setFilesToPrune, | ||||
int nManualPruneHeight); | int nManualPruneHeight); | ||||
static void FindFilesToPrune(std::set<int> &setFilesToPrune, | static void FindFilesToPrune(std::set<int> &setFilesToPrune, | ||||
uint64_t nPruneAfterHeight); | uint64_t nPruneAfterHeight); | ||||
static FILE *OpenUndoFile(const FlatFilePos &pos, bool fReadOnly = false); | static FILE *OpenUndoFile(const FlatFilePos &pos, bool fReadOnly = false); | ||||
static FlatFileSeq BlockFileSeq(); | static FlatFileSeq BlockFileSeq(); | ||||
static FlatFileSeq UndoFileSeq(); | static FlatFileSeq UndoFileSeq(); | ||||
static uint32_t GetNextBlockScriptFlags(const Consensus::Params ¶ms, | static uint32_t GetNextBlockScriptFlags(const Consensus::Params ¶ms, | ||||
const CBlockIndex *pindex) | const CBlockIndex *pindex); | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
bool TestLockPointValidity(const LockPoints *lp) { | bool TestLockPointValidity(const LockPoints *lp) { | ||||
AssertLockHeld(cs_main); | AssertLockHeld(cs_main); | ||||
assert(lp); | assert(lp); | ||||
// If there are relative lock times then the maxInputBlock will be set | // If there are relative lock times then the maxInputBlock will be set | ||||
// If there are no relative lock times, the LockPoints don't depend on the | // If there are no relative lock times, the LockPoints don't depend on the | ||||
// chain | // chain | ||||
if (lp->maxInputBlock) { | if (lp->maxInputBlock) { | ||||
▲ Show 20 Lines • Show All 1,250 Lines • ▼ Show 20 Lines | int32_t ComputeBlockVersion(const CBlockIndex *pindexPrev, | ||||
const Consensus::Params ¶ms) { | const Consensus::Params ¶ms) { | ||||
int32_t nVersion = VERSIONBITS_TOP_BITS; | int32_t nVersion = VERSIONBITS_TOP_BITS; | ||||
return nVersion; | return nVersion; | ||||
} | } | ||||
// Returns the script flags which should be checked for the block after | // Returns the script flags which should be checked for the block after | ||||
// the given block. | // the given block. | ||||
static uint32_t GetNextBlockScriptFlags(const Consensus::Params ¶ms, | static uint32_t GetNextBlockScriptFlags(const Consensus::Params ¶ms, | ||||
const CBlockIndex *pindex) | const CBlockIndex *pindex) { | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | |||||
AssertLockHeld(cs_main); | |||||
uint32_t flags = SCRIPT_VERIFY_NONE; | uint32_t flags = SCRIPT_VERIFY_NONE; | ||||
// Start enforcing P2SH (BIP16) | // Start enforcing P2SH (BIP16) | ||||
if ((pindex->nHeight + 1) >= params.BIP16Height) { | if ((pindex->nHeight + 1) >= params.BIP16Height) { | ||||
flags |= SCRIPT_VERIFY_P2SH; | flags |= SCRIPT_VERIFY_P2SH; | ||||
} | } | ||||
// Start enforcing the DERSIG (BIP66) rule. | // Start enforcing the DERSIG (BIP66) rule. | ||||
▲ Show 20 Lines • Show All 4,132 Lines • Show Last 20 Lines |