Documentation ¶
Index ¶
- Constants
- func ErrAlreadyProcessed(codespace sdk.CodespaceType) sdk.Error
- func ErrAlreadySigned(codespace sdk.CodespaceType) sdk.Error
- func ErrNotValidator(codespace sdk.CodespaceType, address sdk.AccAddress) sdk.Error
- func GetInfoKey(p Payload, cdc *wire.Codec) []byte
- func GetSignKey(p Payload, signer sdk.AccAddress, cdc *wire.Codec) []byte
- func GetSignPrefix(p Payload, cdc *wire.Codec) []byte
- type Handler
- type Info
- type InfoStatus
- type Keeper
- type Msg
- type Payload
Constants ¶
View Source
const ( CodeNotValidator sdk.CodeType = 1101 CodeAlreadyProcessed sdk.CodeType = 1102 CodeAlreadySigned sdk.CodeType = 1103 CodeUnknownRequest sdk.CodeType = sdk.CodeUnknownRequest )
Oracle errors reserve 1101-1199
View Source
const ( Pending = InfoStatus(iota) Processed Timeout )
Define InfoStatus
Variables ¶
This section is empty.
Functions ¶
func ErrAlreadyProcessed ¶
func ErrAlreadyProcessed(codespace sdk.CodespaceType) sdk.Error
ErrAlreadyProcessed called when a payload is already processed
func ErrAlreadySigned ¶
func ErrAlreadySigned(codespace sdk.CodespaceType) sdk.Error
ErrAlreadySigned called when the signer is trying to double signing
func ErrNotValidator ¶
func ErrNotValidator(codespace sdk.CodespaceType, address sdk.AccAddress) sdk.Error
ErrNotValidator called when the signer of a Msg is not a validator
func GetInfoKey ¶
GetInfoKey returns the key for OracleInfo
func GetSignKey ¶
GetSignKey returns the key for sign
Types ¶
type Info ¶
type Info struct { Power sdk.Rat Hash []byte LastSigned int64 Status InfoStatus }
Info for each payload
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the oracle store
func NewKeeper ¶
func NewKeeper(key sdk.KVStoreGetter, cdc *wire.Codec, valset sdk.ValidatorSet, supermaj sdk.Rat, timeout int64) Keeper
NewKeeper constructs a new keeper
Click to show internal directories.
Click to hide internal directories.