flow

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetBlock(ctx context.Context, params structs.HeightHash) (block structs.Block, er error)
	SearchTx(ctx context.Context, r structs.HeightHash, block structs.Block, perPage uint64) (txs []structs.Transaction, err error)
	GetTx(ctx context.Context, qstring []string) (txs []*tx.GetTxsEventResponse, err error)

	GetRewardBalances(ctx context.Context, params []structs.HeightAccount) (resp map[uint64]structs.GetRewardResponse, err error)
	GetValidatorRewardsFromTx(txResp *types.TxResponse, cc map[rstructs.ValidatorAndCurrency]structs.RewardAmount, v map[string]bool) (err error)
}

type TerraFlow

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

func NewTerraFlow

func NewTerraFlow(client Client, storeClient store.StoreCaller, logger *zap.Logger) *TerraFlow

func (*TerraFlow) BlockAndTx

func (f *TerraFlow) BlockAndTx(ctx context.Context, height uint64) (block structs.BlockWithMeta, err error)

func (*TerraFlow) GetDailyRewards

func (f *TerraFlow) GetDailyRewards(ctx context.Context, rdr rstructs.RewardDayReq) (rewardSummary map[rstructs.ValidatorAndCurrency]structs.RewardAmount, err error)

func (*TerraFlow) GetData

func (f *TerraFlow) GetData(ctx context.Context, hr structs.ExpandedHeightRange) (kind string, payload []byte, err error)

func (*TerraFlow) GetRewardBalances

func (f *TerraFlow) GetRewardBalances(ctx context.Context, ha []structs.HeightAccount) (rewardSummary map[uint64]structs.GetRewardResponse, err error)

GetReward gets reward

func (*TerraFlow) GetTransactions

func (ic *TerraFlow) GetTransactions(ctx context.Context, hr structs.ExpandedHeightRange) (structs.Heights, error)

GetTransactions gets new transactions and blocks from terra for given range

func (*TerraFlow) LatestMark

func (f *TerraFlow) LatestMark(ctx context.Context, ldReq structs.LatestDataRequest) (ldResp structs.LatestDataResponse, err error)

Jump to

Keyboard shortcuts

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