aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/genesis.go')
-rw-r--r--core/genesis.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/genesis.go b/core/genesis.go
index e72834822..dd894e0b0 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -19,8 +19,8 @@ var ZeroHash256 = make([]byte, 32)
var ZeroHash160 = make([]byte, 20)
var ZeroHash512 = make([]byte, 64)
-func GenesisBlock(db common.Database) *types.Block {
- genesis := types.NewBlock(common.Hash{}, common.Address{}, common.Hash{}, params.GenesisDifficulty, 42, nil)
+func GenesisBlock(nonce uint64, db common.Database) *types.Block {
+ genesis := types.NewBlock(common.Hash{}, common.Address{}, common.Hash{}, params.GenesisDifficulty, nonce, nil)
genesis.Header().Number = common.Big0
genesis.Header().GasLimit = params.GenesisGasLimit
genesis.Header().GasUsed = common.Big0
@@ -36,7 +36,7 @@ func GenesisBlock(db common.Database) *types.Block {
Balance string
Code string
}
- err := json.Unmarshal(GenesisData, &accounts)
+ err := json.Unmarshal(GenesisAccounts, &accounts)
if err != nil {
fmt.Println("enable to decode genesis json data:", err)
os.Exit(1)
@@ -57,7 +57,7 @@ func GenesisBlock(db common.Database) *types.Block {
return genesis
}
-var GenesisData = []byte(`{
+var GenesisAccounts = []byte(`{
"0000000000000000000000000000000000000001": {"balance": "1"},
"0000000000000000000000000000000000000002": {"balance": "1"},
"0000000000000000000000000000000000000003": {"balance": "1"},