aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-08-03 23:48:24 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-08-04 00:15:48 +0800
commitdcdb7059cc69ee4e77518b8dd92d5c7037aa3c8d (patch)
tree6c3e0c5b59ce2ec6515b4ce96d84421b9b635d94 /eth
parente7f4232b10034d291d1757b96e6277908618223c (diff)
downloaddexon-dcdb7059cc69ee4e77518b8dd92d5c7037aa3c8d.tar.gz
dexon-dcdb7059cc69ee4e77518b8dd92d5c7037aa3c8d.tar.zst
dexon-dcdb7059cc69ee4e77518b8dd92d5c7037aa3c8d.zip
cmd, core, eth: support for the olympic network
Added a --olympic flag which initialiser the olympic protocol settings
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/eth/backend.go b/eth/backend.go
index bed6231ed..4795000e0 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -78,6 +78,7 @@ type Config struct {
GenesisNonce int
GenesisFile string
GenesisBlock *types.Block // used by block tests
+ Olympic bool
BlockChainVersion int
SkipBcVersionCheck bool // e.g. blockchain export
@@ -302,6 +303,14 @@ func New(config *Config) (*Ethereum, error) {
glog.V(logger.Info).Infof("Successfully wrote genesis block. New genesis hash = %x\n", block.Hash())
}
+ if config.Olympic {
+ _, err := core.WriteTestNetGenesisBlock(stateDb, blockDb, 42)
+ if err != nil {
+ return nil, err
+ }
+ glog.V(logger.Error).Infoln("Starting Olympic network")
+ }
+
// This is for testing only.
if config.GenesisBlock != nil {
core.WriteBlock(blockDb, config.GenesisBlock)