aboutsummaryrefslogtreecommitdiff
path: root/eth/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/config.go')
-rw-r--r--eth/config.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/eth/config.go b/eth/config.go
index 6887872..3149c6f 100644
--- a/eth/config.go
+++ b/eth/config.go
@@ -24,6 +24,7 @@ import (
"runtime"
"time"
+ "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/ethash"
"github.com/ethereum/go-ethereum/core"
@@ -155,3 +156,34 @@ type Config struct {
// CheckpointOracle is the configuration for checkpoint oracle.
CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"`
}
+
+func MyDefaultConfig() Config {
+ config := DefaultConfig
+ chainConfig := &params.ChainConfig {
+ ChainID: big.NewInt(42222),
+ HomesteadBlock: big.NewInt(0),
+ DAOForkBlock: big.NewInt(0),
+ DAOForkSupport: true,
+ EIP150Block: big.NewInt(0),
+ EIP150Hash: common.HexToHash("0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0"),
+ EIP155Block: big.NewInt(0),
+ EIP158Block: big.NewInt(0),
+ ByzantiumBlock: big.NewInt(0),
+ ConstantinopleBlock: big.NewInt(0),
+ PetersburgBlock: big.NewInt(0),
+ IstanbulBlock: nil,
+ Ethash: nil,
+ }
+ genBalance := big.NewInt(1000000000000000000)
+
+ config.Genesis = &core.Genesis{
+ Config: chainConfig,
+ Nonce: 0,
+ Number: 0,
+ ExtraData: hexutil.MustDecode("0x00"),
+ GasLimit: 100000000,
+ Difficulty: big.NewInt(0),
+ Alloc: core.GenesisAlloc{ common.Address{}: { Balance: genBalance }},
+ }
+ return config
+}