types

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// MaximumPriceSize defines the maximum size of a price in bytes. This allows
	// up to 32 bytes for the price and 1 byte for the sign (positive/negative).
	MaximumPriceSize = 33

	// NumInjectedTxs is the number of transactions that were injected into
	// the proposal but are not actual transactions. In this case, the oracle
	// info is injected into the proposal but should be ignored by the application.
	NumInjectedTxs = 1

	// OracleInfoIndex is the index of the oracle info in the proposal.
	OracleInfoIndex = 0
)

Variables

This section is empty.

Functions

func RecordLatencyAndStatus added in v1.2.0

func RecordLatencyAndStatus(
	metrics servicemetrics.Metrics, latency time.Duration, err error, method servicemetrics.ABCIMethod,
)

RecordLatencyAndStatus is used by the ABCI handlers to record their e2e latency, and the status of the request to their corresponding metrics objects.

Types

type CodecError added in v1.2.0

type CodecError struct {
	Err error
}

CodecError is an error that is returned when a codec fails to marshal or unmarshal a type.

func (CodecError) Error added in v1.2.0

func (e CodecError) Error() string

func (CodecError) Label added in v1.2.0

func (e CodecError) Label() string

type MissingCommitInfoError added in v1.2.0

type MissingCommitInfoError struct{}

MissingCommitInfoError is an error that is returned when a proposal is missing the CommitInfo from the previous height.

func (MissingCommitInfoError) Error added in v1.2.0

func (e MissingCommitInfoError) Error() string

func (MissingCommitInfoError) Label added in v1.2.0

func (e MissingCommitInfoError) Label() string

type NilRequestError added in v1.2.0

type NilRequestError struct {
	Handler servicemetrics.ABCIMethod
}

NilRequestError is an error that is returned when a nil request is given to the handler.

func (NilRequestError) Error added in v1.2.0

func (e NilRequestError) Error() string

func (NilRequestError) Label added in v1.2.0

func (e NilRequestError) Label() string

type OracleClient added in v1.2.0

type OracleClient interface {
	Prices(ctx context.Context, in *servertypes.QueryPricesRequest, opts ...grpc.CallOption) (*servertypes.QueryPricesResponse, error)
}

OracleClient defines the interface that must be fulfilled by the slinky client. This interface is utilized by the vote extension handler to fetch prices.

type OracleKeeper added in v1.2.0

type OracleKeeper interface {
	GetAllCurrencyPairs(ctx sdk.Context) []slinkytypes.CurrencyPair
	SetPriceForCurrencyPair(ctx sdk.Context, cp slinkytypes.CurrencyPair, qp oracletypes.QuotePrice) error
}

OracleKeeper defines the interface that must be fulfilled by the oracle keeper. This interface is utilized by the PreBlock handler to write oracle data to state for the supported assets.

type WrappedHandlerError added in v1.2.0

type WrappedHandlerError struct {
	Handler servicemetrics.ABCIMethod
	Err     error
}

WrappedHandlerError is an error that is returned when a handler that is wrapped by a Slinky ABCI handler returns an error.

func (WrappedHandlerError) Error added in v1.2.0

func (e WrappedHandlerError) Error() string

func (WrappedHandlerError) Label added in v1.2.0

func (e WrappedHandlerError) Label() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL