From 637216f51e84b0bf4aee3144140a142d2b534965 Mon Sep 17 00:00:00 2001 From: Daniel Van Der Maden Date: Sat, 14 Dec 2019 17:44:13 -0800 Subject: [PATCH] [config] Add localnet config --- internal/configs/node/config.go | 2 ++ internal/params/config.go | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/internal/configs/node/config.go b/internal/configs/node/config.go index 75908ee04..bbacbf87b 100644 --- a/internal/configs/node/config.go +++ b/internal/configs/node/config.go @@ -296,6 +296,8 @@ func (t NetworkType) ChainConfig() params.ChainConfig { return *params.MainnetChainConfig case Pangaea: return *params.PangaeaChainConfig + case Localnet: + return *params.LocalnetChainConfig default: return *params.TestnetChainConfig } diff --git a/internal/params/config.go b/internal/params/config.go index eef5203e9..f9f365a15 100644 --- a/internal/params/config.go +++ b/internal/params/config.go @@ -55,6 +55,17 @@ var ( S3Epoch: big.NewInt(0), } + // LocalnetChainConfig contains the chain parameters to run for local development. + LocalnetChainConfig = &ChainConfig{ + ChainID: TestnetChainID, + CrossTxEpoch: big.NewInt(0), + CrossLinkEpoch: big.NewInt(3), + StakingEpoch: big.NewInt(4), + PreStakingEpoch: big.NewInt(2), + EIP155Epoch: big.NewInt(0), + S3Epoch: big.NewInt(0), + } + // AllProtocolChanges ... // This configuration is intentionally not using keyed fields to force anyone // adding flags to the config to also have to set these fields.