neo-go/pkg/core/blockchainer/services/oracle.go
Roman Khimov 5dd4db2c02 network/services: unify service lifecycle management
Run with Start, Stop with Shutdown, make behavior uniform.
2022-01-14 19:53:45 +03:00

23 lines
701 B
Go

package services
import (
"github.com/nspcc-dev/neo-go/pkg/core/state"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neo-go/pkg/util"
)
// 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)
// UpdateNativeContract updates oracle contract native script and hash.
UpdateNativeContract([]byte, []byte, util.Uint160, int)
// Start runs oracle module.
Start()
// Shutdown shutdowns oracle module.
Shutdown()
}