beacon

package
v0.2012.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package beacon implements the beacon application.

Index

Constants

View Source
const (
	// AppID is the unique application identifier.
	AppID uint8 = 0x04

	// AppName is the ABCI application name.
	// Run before the scheduler application.
	AppName string = "100_beacon"
)

Variables

View Source
var (
	// EventType is the ABCI event type for beacon events.
	EventType = api.EventTypeForApp(AppName)

	// QueryApp is a query for filtering events processed by the
	// beacon application.
	QueryApp = api.QueryForApp(AppName)

	// KeyGenerated is the ABCI event attribute key for the new
	// beacons (value is a CBOR serialized beacon.GenerateEvent).
	KeyGenerated = []byte("generated")
)
View Source
var (
	DebugEntropyCtx = []byte("Ekb-Dumm")
)

Functions

func GetBeacon

func GetBeacon(beaconEpoch epochtime.EpochTime, entropyCtx, entropy []byte) []byte

func New

func New() api.Application

New constructs a new beacon application instance.

Types

type Query

type Query interface {
	Beacon(context.Context) ([]byte, error)
	Genesis(context.Context) (*beacon.Genesis, error)
}

Query is the beacon query interface.

type QueryFactory

type QueryFactory struct {
	// contains filtered or unexported fields
}

QueryFactory is the beacon query factory.

func NewQueryFactory

func NewQueryFactory(state abciAPI.ApplicationQueryState) *QueryFactory

NewQueryFactory returns a new QueryFactory backed by the given state instance.

func (*QueryFactory) QueryAt

func (sf *QueryFactory) QueryAt(ctx context.Context, height int64) (Query, error)

QueryAt returns the beacon query interface for a specific height.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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