Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | |||||
* the prune to be one 128MB block file + added 15% undo data = 147MB greater | * the prune to be one 128MB block file + added 15% undo data = 147MB greater | ||||
* for a total of 545MB. Setting the target to > than 550MB will make it likely | * for a total of 545MB. Setting the target to > than 550MB will make it likely | ||||
* we can respect the target. | * we can respect the target. | ||||
*/ | */ | ||||
static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024; | static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024; | ||||
class BlockValidationOptions { | class BlockValidationOptions { | ||||
private: | private: | ||||
uint64_t excessiveBlockSize; | |||||
bool checkPoW : 1; | bool checkPoW : 1; | ||||
bool checkMerkleRoot : 1; | bool checkMerkleRoot : 1; | ||||
uint64_t excessiveBlockSize; | |||||
public: | public: | ||||
// Do full validation by default | // Do full validation by default | ||||
BlockValidationOptions(const Config &config); | BlockValidationOptions(const Config &config); | ||||
BlockValidationOptions(uint64_t _excessiveBlockSize, bool _checkPow = true, | |||||
bool _checkMerkleRoot = true) | |||||
: excessiveBlockSize(_excessiveBlockSize), checkPoW(_checkPow), | |||||
checkMerkleRoot(_checkMerkleRoot) {} | |||||
BlockValidationOptions withCheckPoW(bool _checkPoW = true) const { | BlockValidationOptions withCheckPoW(bool _checkPoW = true) const { | ||||
BlockValidationOptions ret = *this; | BlockValidationOptions ret = *this; | ||||
ret.checkPoW = _checkPoW; | ret.checkPoW = _checkPoW; | ||||
return ret; | return ret; | ||||
} | } | ||||
BlockValidationOptions | BlockValidationOptions | ||||
▲ Show 20 Lines • Show All 423 Lines • Show Last 20 Lines |