aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
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-04-09 21:32:50 +0800
commit17fb63161b6672c0e8101e5fde709b1b7ab2df23 (patch)
tree01d42174a12f6591964703e7eca998ad25ad6f81 /core/genesis.go
parent98d400f5e003b5b8589f73ac7c196f11708f09eb (diff)
downloaddexon-17fb63161b6672c0e8101e5fde709b1b7ab2df23.tar
dexon-17fb63161b6672c0e8101e5fde709b1b7ab2df23.tar.gz
dexon-17fb63161b6672c0e8101e5fde709b1b7ab2df23.tar.bz2
dexon-17fb63161b6672c0e8101e5fde709b1b7ab2df23.tar.lz
dexon-17fb63161b6672c0e8101e5fde709b1b7ab2df23.tar.xz
dexon-17fb63161b6672c0e8101e5fde709b1b7ab2df23.tar.zst
dexon-17fb63161b6672c0e8101e5fde709b1b7ab2df23.zip
core: set governance owner in genesis
Diffstat (limited to 'core/genesis.go')
-rw-r--r--core/genesis.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/genesis.go b/core/genesis.go
index a176deb00..c9f4e2499 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)