aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2019-02-25 16:41:05 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:22 +0800
commitf1a3f3a8f39d5490f4320591def9c2866d866bc4 (patch)
tree6cc23e1c786baf3ec049cb171bf0a2d6abd3c30a /core/genesis.go
parent3c29f8b33e108c2cd4f1b8d269742d2e5adce669 (diff)
downloadgo-tangerine-f1a3f3a8f39d5490f4320591def9c2866d866bc4.tar
go-tangerine-f1a3f3a8f39d5490f4320591def9c2866d866bc4.tar.gz
go-tangerine-f1a3f3a8f39d5490f4320591def9c2866d866bc4.tar.bz2
go-tangerine-f1a3f3a8f39d5490f4320591def9c2866d866bc4.tar.lz
go-tangerine-f1a3f3a8f39d5490f4320591def9c2866d866bc4.tar.xz
go-tangerine-f1a3f3a8f39d5490f4320591def9c2866d866bc4.tar.zst
go-tangerine-f1a3f3a8f39d5490f4320591def9c2866d866bc4.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.go5
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),