eventsdb

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: MIT Imports: 10 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 string
var (
	RoleValidator  Role = "Validator"
	RoleDelegator  Role = "Delegator"
	RoleDAO        Role = "DAO"
	RoleDevelopers Role = "Developers"
)

func (Role) Marshal added in v0.3.4

func (r Role) Marshal() ([]byte, error)

func (*Role) Unmarshal added in v0.3.4

func (r *Role) Unmarshal(b []byte) error

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)

Jump to

Keyboard shortcuts

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