aboutsummaryrefslogtreecommitdiffstats
path: root/genesis.go
blob: aae9cd1cfe170a9d98f52ff96953a6b6f3573c88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main

import (
  "math"
)

/*
 * This is the special genesis block.
 */

var GenisisHeader = []interface{}{
  // Block number
  uint32(0),
  // Previous hash (none)
  "",
  // Sha of uncles
  string(Sha256Bin(Encode([]interface{}{}))),
  // Coinbase
  "",
  // Root state
  "",
  // Sha of transactions
  string(Sha256Bin(Encode([]interface{}{}))),
  // Difficulty
  uint32(math.Pow(2, 36)),
  // Time
  uint64(1),
  // Nonce
  uint32(0),
  // Extra
  "",
}

var Genesis = []interface{}{ GenisisHeader, []interface{}{}, []interface{}{} }

var GenisisBlock = NewBlock( Encode(Genesis) )