aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-03-17 19:01:40 +0800
committerFelix Lange <fjl@twurst.com>2015-03-17 19:01:40 +0800
commitee7202fa00198abaa423a1483468ca979ac9f3f4 (patch)
tree0f332b84b73997aca73b4d508ab7e8ccf9687bcf /core/genesis.go
parent65eee2006d649b2b4f4fef9332d339444bb479b1 (diff)
parent515d9432fcef8c574627049d437d6898b56c2829 (diff)
downloaddexon-ee7202fa00198abaa423a1483468ca979ac9f3f4.tar.gz
dexon-ee7202fa00198abaa423a1483468ca979ac9f3f4.tar.zst
dexon-ee7202fa00198abaa423a1483468ca979ac9f3f4.zip
Merge remote-tracking branch 'ethereum/conversion' into conversion
Diffstat (limited to 'core/genesis.go')
-rw-r--r--core/genesis.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/genesis.go b/core/genesis.go
index bfd51f196..70845b502 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -6,9 +6,9 @@ import (
"math/big"
"os"
+ "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/state"
)
@@ -26,12 +26,11 @@ var GenesisDiff = big.NewInt(131072)
var GenesisGasLimit = big.NewInt(3141592)
func GenesisBlock(db common.Database) *types.Block {
- genesis := types.NewBlock(ZeroHash256, ZeroHash160, nil, GenesisDiff, 42, "")
+ genesis := types.NewBlock(common.Hash{}, common.Address{}, common.Hash{}, GenesisDiff, 42, "")
genesis.Header().Number = common.Big0
genesis.Header().GasLimit = GenesisGasLimit
genesis.Header().GasUsed = common.Big0
genesis.Header().Time = 0
- genesis.Header().MixDigest = make([]byte, 32)
genesis.Td = common.Big0
@@ -49,7 +48,7 @@ func GenesisBlock(db common.Database) *types.Block {
statedb := state.New(genesis.Root(), db)
for addr, account := range accounts {
codedAddr := common.Hex2Bytes(addr)
- accountState := statedb.GetAccount(codedAddr)
+ accountState := statedb.GetAccount(common.BytesToAddress(codedAddr))
accountState.SetBalance(common.Big(account.Balance))
statedb.UpdateStateObject(accountState)
}