eventsdb

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentDB added in v0.5.1

func GetCurrentDB() *db.GoLevelDB

func RegisterAminoEvents

func RegisterAminoEvents(codec *amino.Codec)

Types

type Event

type Event interface{}

type Events

type Events []Event

type EventsDB

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

func GetCurrent

func GetCurrent() *EventsDB

func NewEventsDB

func NewEventsDB(db *db.GoLevelDB) *EventsDB

func (*EventsDB) AddEvent added in v0.3.4

func (db *EventsDB) AddEvent(height int64, event Event)

func (*EventsDB) FlushEvents added in v0.3.4

func (db *EventsDB) FlushEvents(height int64) error

func (*EventsDB) LoadEvents added in v0.5.0

func (db *EventsDB) LoadEvents(height int64) Events

type RewardEvent

type RewardEvent struct {
	Role            Role
	Address         types.Address
	Amount          []byte
	ValidatorPubKey types.Pubkey
}

func (RewardEvent) MarshalJSON

func (e RewardEvent) MarshalJSON() ([]byte, error)

type Role

type Role byte
const (
	RoleValidator Role = iota
	RoleDelegator
	RoleDAO
	RoleDevelopers
)

func (Role) String added in v0.9.0

func (r Role) String() string

type SlashEvent

type SlashEvent struct {
	Address         types.Address
	Amount          []byte
	Coin            types.CoinSymbol
	ValidatorPubKey types.Pubkey
}

func (SlashEvent) MarshalJSON

func (e SlashEvent) MarshalJSON() ([]byte, error)

type UnbondEvent added in v0.8.0

type UnbondEvent struct {
	Address         types.Address
	Amount          []byte
	Coin            types.CoinSymbol
	ValidatorPubKey types.Pubkey
}

func (UnbondEvent) MarshalJSON added in v0.8.0

func (e UnbondEvent) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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