Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Public Attributes | Private Member Functions | List of all members
dev::eth::ChainParams Struct Reference

#include <ChainParams.h>

Inheritance diagram for dev::eth::ChainParams:
[legend]
Collaboration diagram for dev::eth::ChainParams:
[legend]

Public Member Functions

 ChainParams ()
 
 ChainParams (ChainParams const &)=default
 
 ChainParams (std::string const &_s, h256 const &_stateRoot=h256())
 
 ChainParams (bytes const &_genesisRLP, AccountMap const &_state)
 
 ChainParams (std::string const &_json, bytes const &_genesisRLP, AccountMap const &_state)
 
SealEngineFacecreateSealEngine ()
 
h256 calculateStateRoot (bool _force=false) const
 
bytes genesisBlock () const
 Genesis block info. More...
 
ChainParams loadConfig (std::string const &_json, h256 const &_stateRoot=h256()) const
 load config/genesis More...
 
ChainParams loadGenesisState (std::string const &_json, h256 const &_stateRoot=h256()) const
 
ChainParams loadGenesis (std::string const &_json, h256 const &_stateRoot=h256()) const
 
- Public Member Functions inherited from dev::eth::ChainOperationParams
 ChainOperationParams ()
 
 operator bool () const
 
u256 u256Param (std::string const &_name) const
 Convenience method to get an otherParam as a u256 int. More...
 

Public Attributes

h256 parentHash = h256()
 Genesis params. More...
 
Address author = Address()
 
u256 difficulty = 1
 
u256 gasLimit = 1 << 31
 
u256 gasUsed = 0
 
u256 timestamp = 0
 
bytes extraData
 
h256 stateRoot
 Only pre-populate if known equivalent to genesisState's root. If they're different Bad Things Will Happen. More...
 
AccountMap genesisState
 
unsigned sealFields = 0
 
bytes sealRLP
 
- Public Attributes inherited from dev::eth::ChainOperationParams
std::string sealEngineName = "NoProof"
 The chain sealer name: e.g. Ethash, NoProof, BasicAuthority. More...
 
u256 blockReward = 0
 General chain params. More...
 
u256 maximumExtraDataSize = 1024
 
u256 accountStartNonce = 0
 
bool tieBreakingGas = true
 
std::unordered_map< Address, PrecompiledContractprecompiled
 Precompiled contracts as specified in the chain params. More...
 
std::unordered_map< std::string, std::string > otherParams
 Additional parameters. More...
 

Private Member Functions

void populateFromGenesis (bytes const &_genesisRLP, AccountMap const &_state)
 

Detailed Description

Definition at line 37 of file ChainParams.h.

Constructor & Destructor Documentation

ChainParams::ChainParams ( )

Definition at line 38 of file ChainParams.cpp.

Here is the call graph for this function:

dev::eth::ChainParams::ChainParams ( ChainParams const &  )
default
dev::eth::ChainParams::ChainParams ( std::string const &  _s,
h256 const &  _stateRoot = h256() 
)
dev::eth::ChainParams::ChainParams ( bytes const &  _genesisRLP,
AccountMap const &  _state 
)
inline

Definition at line 42 of file ChainParams.h.

Here is the call graph for this function:

dev::eth::ChainParams::ChainParams ( std::string const &  _json,
bytes const &  _genesisRLP,
AccountMap const &  _state 
)
inline

Definition at line 43 of file ChainParams.h.

Here is the call graph for this function:

Member Function Documentation

h256 ChainParams::calculateStateRoot ( bool  _force = false) const

Definition at line 161 of file ChainParams.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

SealEngineFace * ChainParams::createSealEngine ( )

Definition at line 116 of file ChainParams.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bytes ChainParams::genesisBlock ( ) const

Genesis block info.

Definition at line 176 of file ChainParams.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ChainParams ChainParams::loadConfig ( std::string const &  _json,
h256 const &  _stateRoot = h256() 
) const

load config/genesis

Definition at line 54 of file ChainParams.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ChainParams ChainParams::loadGenesis ( std::string const &  _json,
h256 const &  _stateRoot = h256() 
) const

Definition at line 88 of file ChainParams.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ChainParams ChainParams::loadGenesisState ( std::string const &  _json,
h256 const &  _stateRoot = h256() 
) const

Definition at line 80 of file ChainParams.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ChainParams::populateFromGenesis ( bytes const &  _genesisRLP,
AccountMap const &  _state 
)
private

Definition at line 131 of file ChainParams.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Address dev::eth::ChainParams::author = Address()

Definition at line 49 of file ChainParams.h.

u256 dev::eth::ChainParams::difficulty = 1

Definition at line 50 of file ChainParams.h.

bytes dev::eth::ChainParams::extraData

Definition at line 54 of file ChainParams.h.

u256 dev::eth::ChainParams::gasLimit = 1 << 31

Definition at line 51 of file ChainParams.h.

u256 dev::eth::ChainParams::gasUsed = 0

Definition at line 52 of file ChainParams.h.

AccountMap dev::eth::ChainParams::genesisState

Definition at line 56 of file ChainParams.h.

h256 dev::eth::ChainParams::parentHash = h256()

Genesis params.

Definition at line 48 of file ChainParams.h.

unsigned dev::eth::ChainParams::sealFields = 0

Definition at line 58 of file ChainParams.h.

bytes dev::eth::ChainParams::sealRLP

Definition at line 59 of file ChainParams.h.

h256 dev::eth::ChainParams::stateRoot
mutable

Only pre-populate if known equivalent to genesisState's root. If they're different Bad Things Will Happen.

Definition at line 55 of file ChainParams.h.

u256 dev::eth::ChainParams::timestamp = 0

Definition at line 53 of file ChainParams.h.


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