veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::BtcChainParamsMain Struct Reference

mainnet network params in Bitcoin chain. More...

Detailed Description

Definition at line 64 of file btc_chain_params.hpp.

#include <btc_chain_params.hpp>

+ Inheritance diagram for altintegration::BtcChainParamsMain:
+ Collaboration diagram for altintegration::BtcChainParamsMain:

Public Member Functions

bool EnableTimeAdjustment () const noexcept override
 
const char * networkName () const noexcept override
 
uint32_t numBlocksForBootstrap () const noexcept override
 minimum number of BTC blocks needed to bootstrap chain More...
 
uint256 getPowLimit () const override
 
uint32_t getPowTargetTimespan () const noexcept override
 
uint32_t getPowTargetSpacing () const noexcept override
 
bool getAllowMinDifficultyBlocks () const noexcept override
 
bool getPowNoRetargeting () const noexcept override
 
- Public Member Functions inherited from altintegration::BtcChainParams
virtual uint256 getPowLimit () const =0
 
virtual uint32_t getPowTargetTimespan () const noexcept=0
 
virtual uint32_t getPowTargetSpacing () const noexcept=0
 
virtual bool getAllowMinDifficultyBlocks () const noexcept=0
 
virtual bool getPowNoRetargeting () const noexcept=0
 
virtual bool EnableTimeAdjustment () const noexcept=0
 
uint32_t getDifficultyAdjustmentInterval () const noexcept
 
virtual uint32_t numBlocksForBootstrap () const noexcept=0
 minimum number of BTC blocks needed to bootstrap chain More...
 
virtual const char * networkName () const noexcept=0
 
virtual uint32_t maxFutureBlockTime () const noexcept
 
int32_t getMaxReorgBlocks () const noexcept
 by default we store this many last BTC blocks in RAM More...
 
uint32_t preserveBlocksBehindFinal () const noexcept
 when finalizeBlockImpl is called, this many blocks behind final block will be preserved in RAM. More...
 
int32_t getOldBlocksWindow () const noexcept
 all blocks further than this number of blocks are considered "old" More...
 

Additional Inherited Members

- Public Attributes inherited from altintegration::BtcChainParams
uint32_t mOldBlocksWindow = 1000
 
int32_t mMaxReorgBlocks = BTC_MAX_REORG_BLOCKS_MIN_VALUE
 
- Protected Attributes inherited from altintegration::BtcChainParams
uint32_t mMaxFutureBlockTime = 2 * 60 * 60
 

Member Function Documentation

◆ EnableTimeAdjustment()

bool altintegration::BtcChainParamsMain::EnableTimeAdjustment ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::BtcChainParams.

Definition at line 67 of file btc_chain_params.hpp.

67{ return true; }

◆ getAllowMinDifficultyBlocks()

bool altintegration::BtcChainParamsMain::getAllowMinDifficultyBlocks ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::BtcChainParams.

Definition at line 84 of file btc_chain_params.hpp.

84{ return false; }

◆ getPowLimit()

uint256 altintegration::BtcChainParamsMain::getPowLimit ( ) const
inlineoverridevirtual

Implements altintegration::BtcChainParams.

Definition at line 75 of file btc_chain_params.hpp.

75 {
76 return uint256::fromHex(
77 "ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000");
78 }

◆ getPowNoRetargeting()

bool altintegration::BtcChainParamsMain::getPowNoRetargeting ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::BtcChainParams.

Definition at line 85 of file btc_chain_params.hpp.

85{ return false; }

◆ getPowTargetSpacing()

uint32_t altintegration::BtcChainParamsMain::getPowTargetSpacing ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::BtcChainParams.

Definition at line 83 of file btc_chain_params.hpp.

83{ return 10 * 60; }

◆ getPowTargetTimespan()

uint32_t altintegration::BtcChainParamsMain::getPowTargetTimespan ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::BtcChainParams.

Definition at line 80 of file btc_chain_params.hpp.

80 {
81 return 14 * 24 * 60 * 60; // two weeks
82 }

◆ networkName()

const char * altintegration::BtcChainParamsMain::networkName ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::BtcChainParams.

Definition at line 69 of file btc_chain_params.hpp.

69{ return "main"; }

◆ numBlocksForBootstrap()

uint32_t altintegration::BtcChainParamsMain::numBlocksForBootstrap ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::BtcChainParams.

Definition at line 71 of file btc_chain_params.hpp.

71 {
72 return getDifficultyAdjustmentInterval();
73 };

The documentation for this struct was generated from the following file: