Documentation
¶
Index ¶
- func InitChainConfig(chainId uint16)
- type ChainConfig
- func (cfg *ChainConfig) IsMainNet() bool
- func (cfg *ChainConfig) IsZIP001(h uint64) bool
- func (cfg *ChainConfig) IsZIP002(h uint64) bool
- func (cfg *ChainConfig) IsZIP003(h uint64) bool
- func (cfg *ChainConfig) IsZIP004(h uint64) bool
- func (cfg *ChainConfig) IsZIP005Checkpoint(preHeight, height uint64) bool
- func (cfg *ChainConfig) IsZIP006(h uint64) bool
- func (cfg *ChainConfig) IsZIP006Checkpoint(preHeight, height uint64) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitChainConfig ¶
func InitChainConfig(chainId uint16)
Types ¶
type ChainConfig ¶
type ChainConfig struct { // Chain id identifies the current chain ChainId uint16 // zip001 makes the block weight comparision more fair and random ZIP001 uint64 // zip002 implements the gas price calculation when multiplying ZIP002 uint64 // zip003 solves the problem of weight comparison when two blocks have the same proves ZIP003 uint64 // zip004 change refund time ZIP004 uint64 // zip005 adjusting economic model ZIP005 uint64 // zip006 add addressmanager contract ZIP006 uint64 }
ChainConfig defines the basic params of the chain
func GetChainConfig ¶
func GetChainConfig() *ChainConfig
func (*ChainConfig) IsMainNet ¶
func (cfg *ChainConfig) IsMainNet() bool
func (*ChainConfig) IsZIP001 ¶
func (cfg *ChainConfig) IsZIP001(h uint64) bool
func (*ChainConfig) IsZIP002 ¶
func (cfg *ChainConfig) IsZIP002(h uint64) bool
func (*ChainConfig) IsZIP003 ¶ added in v1.0.8
func (cfg *ChainConfig) IsZIP003(h uint64) bool
func (*ChainConfig) IsZIP004 ¶ added in v1.0.9
func (cfg *ChainConfig) IsZIP004(h uint64) bool
func (*ChainConfig) IsZIP005Checkpoint ¶ added in v1.0.10
func (cfg *ChainConfig) IsZIP005Checkpoint(preHeight, height uint64) bool
func (*ChainConfig) IsZIP006 ¶ added in v1.0.11
func (cfg *ChainConfig) IsZIP006(h uint64) bool
func (*ChainConfig) IsZIP006Checkpoint ¶ added in v1.0.11
func (cfg *ChainConfig) IsZIP006Checkpoint(preHeight, height uint64) bool
Click to show internal directories.
Click to hide internal directories.