aboutsummaryrefslogtreecommitdiffstats
path: root/test/keygen.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-01-13 16:21:17 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:56 +0800
commit7c664ca090d90815db23644c209d4f5cdf0ff594 (patch)
tree79f192501314c5ae37f8cb6c45ac3ef759d01945 /test/keygen.go
parent7bf5e2205a49a500672ff7415921aa6659c46611 (diff)
downloaddexon-7c664ca090d90815db23644c209d4f5cdf0ff594.tar
dexon-7c664ca090d90815db23644c209d4f5cdf0ff594.tar.gz
dexon-7c664ca090d90815db23644c209d4f5cdf0ff594.tar.bz2
dexon-7c664ca090d90815db23644c209d4f5cdf0ff594.tar.lz
dexon-7c664ca090d90815db23644c209d4f5cdf0ff594.tar.xz
dexon-7c664ca090d90815db23644c209d4f5cdf0ff594.tar.zst
dexon-7c664ca090d90815db23644c209d4f5cdf0ff594.zip
consensus: implement DEXON cryptoeconomics v4.0 (#145)
Diffstat (limited to 'test/keygen.go')
-rw-r--r--test/keygen.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/keygen.go b/test/keygen.go
index b98d70751..e7441e146 100644
--- a/test/keygen.go
+++ b/test/keygen.go
@@ -24,15 +24,7 @@ var preFundAddresss = []string{
}
func main() {
- data, err := ioutil.ReadFile(genesisFile)
- if err != nil {
- panic(err)
- }
-
- genesis := new(core.Genesis)
- if err := json.Unmarshal(data, &genesis); err != nil {
- panic(err)
- }
+ genesis := core.DefaultGenesisBlock()
// Clear previous allocation.
genesis.Alloc = make(map[common.Address]core.GenesisAccount)
@@ -71,7 +63,7 @@ func main() {
fmt.Printf("Created account %s\n", address.String())
}
- data, err = json.MarshalIndent(genesis, "", " ")
+ data, err := json.MarshalIndent(genesis, "", " ")
if err != nil {
panic(err)
}