aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-01 16:53:32 +0800
committerobscuren <geffobscura@gmail.com>2015-04-01 16:53:32 +0800
commit0a554a1f27ece4235d180373643482ceb57d90ca (patch)
tree6ab7d4cd70f7c49f64822d8e626f422158c70e78 /core/genesis.go
parentd3e86f9208d775ee8020d5583d0aac8f3cfb52b2 (diff)
downloaddexon-0a554a1f27ece4235d180373643482ceb57d90ca.tar.gz
dexon-0a554a1f27ece4235d180373643482ceb57d90ca.tar.zst
dexon-0a554a1f27ece4235d180373643482ceb57d90ca.zip
Blocktest fixed, Execution fixed
* Added new CreateAccount method which properly overwrites previous accounts (excluding balance) * Fixed block tests (100% success)
Diffstat (limited to 'core/genesis.go')
-rw-r--r--core/genesis.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/genesis.go b/core/genesis.go
index 716298231..7958157a4 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -47,7 +47,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(common.BytesToAddress(codedAddr))
+ accountState := statedb.CreateAccount(common.BytesToAddress(codedAddr))
accountState.SetBalance(common.Big(account.Balance))
accountState.SetCode(common.FromHex(account.Code))
statedb.UpdateStateObject(accountState)