aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2017-01-09 19:09:37 +0800
committerBas van Kervel <basvankervel@gmail.com>2017-01-12 16:50:54 +0800
commit745a3adebd9f98e9d53a7d07519d415b55fa5d1f (patch)
tree13ca74c80dcf6f529999e8bf23ef5f1daa322458 /core/genesis.go
parent218ec6c0856caaff70df8e318e035c4ed8c97820 (diff)
downloaddexon-745a3adebd9f98e9d53a7d07519d415b55fa5d1f.tar
dexon-745a3adebd9f98e9d53a7d07519d415b55fa5d1f.tar.gz
dexon-745a3adebd9f98e9d53a7d07519d415b55fa5d1f.tar.bz2
dexon-745a3adebd9f98e9d53a7d07519d415b55fa5d1f.tar.lz
dexon-745a3adebd9f98e9d53a7d07519d415b55fa5d1f.tar.xz
dexon-745a3adebd9f98e9d53a7d07519d415b55fa5d1f.tar.zst
dexon-745a3adebd9f98e9d53a7d07519d415b55fa5d1f.zip
core: remove support for Olympic network
Diffstat (limited to 'core/genesis.go')
-rw-r--r--core/genesis.go36
1 files changed, 8 insertions, 28 deletions
diff --git a/core/genesis.go b/core/genesis.go
index c0f0c9f24..4a440c267 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -178,12 +178,6 @@ func WriteTestNetGenesisBlock(chainDb ethdb.Database) (*types.Block, error) {
return WriteGenesisBlock(chainDb, strings.NewReader(DefaultTestnetGenesisBlock()))
}
-// WriteOlympicGenesisBlock assembles the Olympic genesis block and writes it
-// along with all associated state into a chain database.
-func WriteOlympicGenesisBlock(db ethdb.Database) (*types.Block, error) {
- return WriteGenesisBlock(db, strings.NewReader(OlympicGenesisBlock()))
-}
-
// DefaultGenesisBlock assembles a JSON string representing the default Ethereum
// genesis block.
func DefaultGenesisBlock() string {
@@ -209,26 +203,12 @@ func DefaultTestnetGenesisBlock() string {
return string(blob)
}
-// OlympicGenesisBlock assembles a JSON string representing the Olympic genesis
-// block.
-func OlympicGenesisBlock() string {
- return fmt.Sprintf(`{
- "nonce":"0x%x",
- "gasLimit":"0x%x",
- "difficulty":"0x%x",
- "alloc": {
- "0000000000000000000000000000000000000001": {"balance": "1"},
- "0000000000000000000000000000000000000002": {"balance": "1"},
- "0000000000000000000000000000000000000003": {"balance": "1"},
- "0000000000000000000000000000000000000004": {"balance": "1"},
- "dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6": {"balance": "1606938044258990275541962092341162602522202993782792835301376"},
- "e4157b34ea9615cfbde6b4fda419828124b70c78": {"balance": "1606938044258990275541962092341162602522202993782792835301376"},
- "b9c015918bdaba24b4ff057a92a3873d6eb201be": {"balance": "1606938044258990275541962092341162602522202993782792835301376"},
- "6c386a4b26f73c802f34673f7248bb118f97424a": {"balance": "1606938044258990275541962092341162602522202993782792835301376"},
- "cd2a3d9f938e13cd947ec05abc7fe734df8dd826": {"balance": "1606938044258990275541962092341162602522202993782792835301376"},
- "2ef47100e0787b915105fd5e3f4ff6752079d5cb": {"balance": "1606938044258990275541962092341162602522202993782792835301376"},
- "e6716f9544a56c530d868e4bfbacb172315bdead": {"balance": "1606938044258990275541962092341162602522202993782792835301376"},
- "1a26338f0d905e295fccb71fa9ea849ffa12aaf4": {"balance": "1606938044258990275541962092341162602522202993782792835301376"}
- }
- }`, types.EncodeNonce(42), params.GenesisGasLimit.Bytes(), params.GenesisDifficulty.Bytes())
+// DevGenesisBlock assembles a JSON string representing a local dev genesis block.
+func DevGenesisBlock() string {
+ reader := bzip2.NewReader(base64.NewDecoder(base64.StdEncoding, strings.NewReader(defaultDevnetGenesisBlock)))
+ blob, err := ioutil.ReadAll(reader)
+ if err != nil {
+ panic(fmt.Sprintf("failed to load dev genesis: %v", err))
+ }
+ return string(blob)
}