diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-18 21:56:12 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:50 +0800 |
commit | 17fb63161b6672c0e8101e5fde709b1b7ab2df23 (patch) | |
tree | 01d42174a12f6591964703e7eca998ad25ad6f81 /core | |
parent | 98d400f5e003b5b8589f73ac7c196f11708f09eb (diff) | |
download | dexon-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')
-rw-r--r-- | core/genesis.go | 4 |
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) |