diff options
author | Sonic <sonic@dexon.org> | 2019-02-25 16:41:05 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:57 +0800 |
commit | 6e66efc9f69d59a011215f88a0de03508d9c56ab (patch) | |
tree | 096c2ad2da556aebfcb6fc7a16bdb528b9adf044 /core/genesis.go | |
parent | 94477130cc35bd196b23267b4be130668a13b74c (diff) | |
download | dexon-6e66efc9f69d59a011215f88a0de03508d9c56ab.tar dexon-6e66efc9f69d59a011215f88a0de03508d9c56ab.tar.gz dexon-6e66efc9f69d59a011215f88a0de03508d9c56ab.tar.bz2 dexon-6e66efc9f69d59a011215f88a0de03508d9c56ab.tar.lz dexon-6e66efc9f69d59a011215f88a0de03508d9c56ab.tar.xz dexon-6e66efc9f69d59a011215f88a0de03508d9c56ab.tar.zst dexon-6e66efc9f69d59a011215f88a0de03508d9c56ab.zip |
core: set oracle contract's code (#209)
So that other contract can call oracle contract.
Diffstat (limited to 'core/genesis.go')
-rw-r--r-- | core/genesis.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/genesis.go b/core/genesis.go index c378c0ab2..40e8a06bf 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -329,6 +329,11 @@ func (g *Genesis) ToBlock(db ethdb.Database) *types.Block { govStateHelper.IncTotalSupply(totalSupply) } + // Set oracle contract. + for address := range vm.OracleContracts { + statedb.SetCode(address, []byte{0xed}) + } + root := statedb.IntermediateRoot(false) head := &types.Header{ Number: new(big.Int).SetUint64(g.Number), |