From 6e66efc9f69d59a011215f88a0de03508d9c56ab Mon Sep 17 00:00:00 2001 From: Sonic Date: Mon, 25 Feb 2019 16:41:05 +0800 Subject: core: set oracle contract's code (#209) So that other contract can call oracle contract. --- core/genesis.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/genesis.go') 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), -- cgit v1.2.3