aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-18 21:56:12 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commit1a26392d20f4d3d3d7c7af6b6f04d8d7760b8036 (patch)
treea8e9d5972fe77d7d174acc1b498ddb473fa1387c /core
parent7ac1f8430d6d3e0c59f50fa1c94c2ba5cdd1430b (diff)
downloaddexon-1a26392d20f4d3d3d7c7af6b6f04d8d7760b8036.tar.gz
dexon-1a26392d20f4d3d3d7c7af6b6f04d8d7760b8036.tar.zst
dexon-1a26392d20f4d3d3d7c7af6b6f04d8d7760b8036.zip
core: set governance owner in genesis
Diffstat (limited to 'core')
-rw-r--r--core/genesis.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/genesis.go b/core/genesis.go
index ed47d5b42..8dbac78a8 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -255,7 +255,6 @@ func (g *Genesis) ToBlock(db ethdb.Database) *types.Block {
govStateHelper := vm.GovernanceStateHelper{statedb}
for addr, account := range g.Alloc {
- fmt.Println(account)
statedb.AddBalance(addr, new(big.Int).Sub(account.Balance, account.Staked))
statedb.SetCode(addr, account.Code)
statedb.SetNonce(addr, account.Nonce)
@@ -277,6 +276,9 @@ func (g *Genesis) ToBlock(db ethdb.Database) *types.Block {
govStateHelper.Stake(addr, account.PublicKey, account.Staked)
}
}
+ // Owner.
+ govStateHelper.SetOwner(g.Config.Dexcon.Owner)
+
// Governance configuration.
govStateHelper.UpdateConfiguration(g.Config.Dexcon)