oracle: integrate module in core and RPC
1. Initialization is performed via `Blockchain` methods. 2. Native Oracle contract updates list of oracle nodes and in-fly requests in `PostPersist`. 3. RPC uses Oracle module directly.
This commit is contained in:
parent
7e16bea126
commit
43e4d3af88
31 changed files with 590 additions and 44 deletions
|
@ -66,6 +66,9 @@ type (
|
|||
|
||||
// TimePerBlock is an interval which should pass between two successive blocks.
|
||||
TimePerBlock time.Duration
|
||||
|
||||
// OracleCfg is oracle module configuration.
|
||||
OracleCfg config.OracleConfiguration
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -96,5 +99,6 @@ func NewServerConfig(cfg config.Config) ServerConfig {
|
|||
MinPeers: appConfig.MinPeers,
|
||||
Wallet: wc,
|
||||
TimePerBlock: time.Duration(protoConfig.SecondsPerBlock) * time.Second,
|
||||
OracleCfg: appConfig.Oracle,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue