From 3f900e50a25b9dafca733a6815b4c56954e07415 Mon Sep 17 00:00:00 2001 From: AnilChinchawale Date: Sun, 10 Mar 2019 15:52:21 +0530 Subject: [PATCH] Version pump to v0.2.0 --- params/config.go | 14 +++++++++++--- params/version.go | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/params/config.go b/params/config.go index 615b37d47a..46def975c3 100644 --- a/params/config.go +++ b/params/config.go @@ -89,7 +89,7 @@ var ( // // This configuration is intentionally not using keyed fields to force anyone // adding flags to the config to also have to set these fields. - AllXDPoSProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, &XDPoSConfig{Period: 0, Epoch: 30000}} + AllXDPoSProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, &XDPoSConfig{Period: 0, Epoch: 30000}} AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil} TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil} TestRules = TestChainConfig.Rules(new(big.Int)) @@ -121,7 +121,7 @@ type ChainConfig struct { // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty"` Clique *CliqueConfig `json:"clique,omitempty"` - XDPoS *XDPoSConfig `json:"XDPoS,omitempty"` + XDPoS *XDPoSConfig `json:"XDPoS,omitempty"` } // EthashConfig is the consensus engine configs for proof-of-work based sealing. @@ -143,7 +143,7 @@ func (c *CliqueConfig) String() string { return "clique" } -// XDPoSConfig is the consensus engine configs for XinFin-DPoS based sealing. +// XDPoSConfig is the consensus engine configs for delegated-proof-of-stake based sealing. type XDPoSConfig struct { Period uint64 `json:"period"` // Number of seconds between blocks to enforce Epoch uint64 `json:"epoch"` // Epoch length to reset votes and checkpoint @@ -213,6 +213,14 @@ func (c *ChainConfig) IsConstantinople(num *big.Int) bool { return isForked(c.ConstantinopleBlock, num) } +func (c *ChainConfig) IsTIP2019(num *big.Int) bool { + return isForked(common.TIP2019Block, num) +} + +func (c *ChainConfig) IsTIPSigning(num *big.Int) bool { + return isForked(common.TIPSigning, num) +} + // GasTable returns the gas table corresponding to the current phase (homestead or homestead reprice). // // The returned GasTable's fields shouldn't, under any circumstances, be changed. diff --git a/params/version.go b/params/version.go index 81f702e1b4..4b65bdbfff 100644 --- a/params/version.go +++ b/params/version.go @@ -22,8 +22,8 @@ import ( const ( VersionMajor = 0 // Major version component of the current release - VersionMinor = 1 // Minor version component of the current release - VersionPatch = 1 // Patch version component of the current release + VersionMinor = 2 // Minor version component of the current release + VersionPatch = 0 // Patch version component of the current release VersionMeta = "unstable" // Version metadata to append to the version string )