diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-17 18:19:23 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-17 18:19:23 +0800 |
commit | 515d9432fcef8c574627049d437d6898b56c2829 (patch) | |
tree | 40322c532a38b8f563d452bd75dab69729e55d92 /core/genesis.go | |
parent | 8ce6a3647821706cf5e9bb1a9dc13f23c84f6585 (diff) | |
download | dexon-515d9432fcef8c574627049d437d6898b56c2829.tar dexon-515d9432fcef8c574627049d437d6898b56c2829.tar.gz dexon-515d9432fcef8c574627049d437d6898b56c2829.tar.bz2 dexon-515d9432fcef8c574627049d437d6898b56c2829.tar.lz dexon-515d9432fcef8c574627049d437d6898b56c2829.tar.xz dexon-515d9432fcef8c574627049d437d6898b56c2829.tar.zst dexon-515d9432fcef8c574627049d437d6898b56c2829.zip |
converted vm
Diffstat (limited to 'core/genesis.go')
-rw-r--r-- | core/genesis.go | 7 |
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) } |