forked from TrueCloudLab/neoneo-go
43e4d3af88
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.
20 lines
568 B
Go
20 lines
568 B
Go
package services
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/core/state"
|
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
|
)
|
|
|
|
// Oracle specifies oracle service interface.
|
|
type Oracle interface {
|
|
// AddRequests processes new requests.
|
|
AddRequests(map[uint64]*state.OracleRequest)
|
|
// RemoveRequests removes already processed requests.
|
|
RemoveRequests([]uint64)
|
|
// UpdateOracleNodes updates oracle nodes.
|
|
UpdateOracleNodes(keys.PublicKeys)
|
|
// Run runs oracle module. Must be invoked in a separate goroutine.
|
|
Run()
|
|
// Shutdown shutdowns oracle module.
|
|
Shutdown()
|
|
}
|