veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::Config::Bootstrap< Block, ChainParams > Struct Template Reference

per-chain bootstrap config More...

Detailed Description

template<typename Block, typename ChainParams>
struct altintegration::Config::Bootstrap< Block, ChainParams >

Definition at line 44 of file config.hpp.

#include <config.hpp>

+ Inheritance diagram for altintegration::Config::Bootstrap< Block, ChainParams >:
+ Collaboration diagram for altintegration::Config::Bootstrap< Block, ChainParams >:

Static Public Member Functions

static Bootstrap create (int32_t start, const std::vector< std::string > &hexblocks, std::shared_ptr< ChainParams > params)
 factory method to create this config from vector of hexencoded blocks More...
 

Public Attributes

int32_t startHeight = 0
 height of the first bootstrap block More...
 
std::vector< Block > blocks
 a contiguous list of blocks. More...
 
std::shared_ptr< ChainParams > params
 network parameters - Mainnet/Testnet/Regtest... More...
 

Member Function Documentation

◆ create()

template<typename Block , typename ChainParams >
static Bootstrap altintegration::Config::Bootstrap< Block, ChainParams >::create ( int32_t  start,
const std::vector< std::string > &  hexblocks,
std::shared_ptr< ChainParams >  params 
)
inlinestatic

Definition at line 57 of file config.hpp.

59 {
60 Bootstrap b;
61 b.startHeight = start;
62 b.params = std::move(params);
63
64 b.blocks.reserve(hexblocks.size());
65 std::transform(hexblocks.begin(),
66 hexblocks.end(),
67 std::back_inserter(b.blocks),
68 AssertDeserializeFromRawHex<Block>);
69
70 return b;
71 }
std::shared_ptr< ChainParams > params
network parameters - Mainnet/Testnet/Regtest...
Definition: config.hpp:54

Member Data Documentation

◆ blocks

template<typename Block , typename ChainParams >
std::vector<Block> altintegration::Config::Bootstrap< Block, ChainParams >::blocks

if empty, bootstrapWithGenesis() will be used has to have at least params->numBlocksForBootstrap() blocks

Definition at line 51 of file config.hpp.

◆ params

template<typename Block , typename ChainParams >
std::shared_ptr<ChainParams> altintegration::Config::Bootstrap< Block, ChainParams >::params

Definition at line 54 of file config.hpp.

◆ startHeight

template<typename Block , typename ChainParams >
int32_t altintegration::Config::Bootstrap< Block, ChainParams >::startHeight = 0

Definition at line 46 of file config.hpp.


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