indexing

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Finalize

func Finalize(db *store.Store, data *Data) error

Finalize generates summary records

func Import

func Import(db *store.Store, data *Data) error

Import creates new database records for the chain data

func ReadIdentityFile added in v0.14.0

func ReadIdentityFile(src string, handler func(Identity) error) error

func RewardCalculation added in v0.11.0

func RewardCalculation(db *store.Store, block model.Block) error

RewardCalculation calculates rewards

Types

type Data

type Data struct {
	Block           *model.Block
	Validator       *model.Validator
	CreatorAccount  *model.Account
	ValidatorEpochs []model.ValidatorEpoch
	Accounts        []model.Account
	Snarkers        []model.Snarker
	Transactions    []model.Transaction
	SnarkJobs       []model.SnarkJob
}

Data contains all the records processed for a height

func Prepare

func Prepare(archiveBlock *archive.Block, graphBlock *graph.Block, validatorEpochs []model.ValidatorEpoch) (*Data, error)

Prepare generates a new models from the graph block data

func (Data) AccountIDs added in v0.15.0

func (d Data) AccountIDs() []string

AccountIDs returns a list of all accounts seen in the data payload

type Identity added in v0.14.0

type Identity struct {
	PublicKey string   `json:"public_key"`
	Name      string   `json:"name"`
	Fee       *float64 `json:"fee"`
}

Jump to

Keyboard shortcuts

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