power

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0, MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainPower

type ChainPower struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	StateRoot string `pg:",pk"`

	TotalRawBytesPower string `pg:"type:numeric,notnull"`
	TotalQABytesPower  string `pg:"type:numeric,notnull"`

	TotalRawBytesCommitted string `pg:"type:numeric,notnull"`
	TotalQABytesCommitted  string `pg:"type:numeric,notnull"`

	TotalPledgeCollateral string `pg:"type:numeric,notnull"`

	QASmoothedPositionEstimate string `pg:"type:numeric,notnull"`
	QASmoothedVelocityEstimate string `pg:"type:numeric,notnull"`

	MinerCount              uint64 `pg:",use_zero"`
	ParticipatingMinerCount uint64 `pg:",use_zero"`
}

func (*ChainPower) AsVersion

func (cp *ChainPower) AsVersion(version model.Version) (interface{}, bool)

func (*ChainPower) Persist

func (cp *ChainPower) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type ChainPowerList

type ChainPowerList []*ChainPower

ChainPowerList is a slice of ChainPowers for batch insertion.

func (ChainPowerList) Persist

func (cpl ChainPowerList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

PersistWithTx makes a batch insertion of the list using the given transaction.

type ChainPowerV0

type ChainPowerV0 struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	StateRoot string `pg:",pk"`

	TotalRawBytesPower string `pg:",notnull"`
	TotalQABytesPower  string `pg:",notnull"`

	TotalRawBytesCommitted string `pg:",notnull"`
	TotalQABytesCommitted  string `pg:",notnull"`

	TotalPledgeCollateral string `pg:",notnull"`

	QASmoothedPositionEstimate string `pg:",notnull"`
	QASmoothedVelocityEstimate string `pg:",notnull"`

	MinerCount              uint64 `pg:",use_zero"`
	ParticipatingMinerCount uint64 `pg:",use_zero"`
	// contains filtered or unexported fields
}

type PowerActorClaim

type PowerActorClaim struct {
	Height          int64  `pg:",pk,notnull,use_zero"`
	MinerID         string `pg:",pk,notnull"`
	StateRoot       string `pg:",pk,notnull"`
	RawBytePower    string `pg:"type:numeric,notnull"`
	QualityAdjPower string `pg:"type:numeric,notnull"`
}

func (*PowerActorClaim) AsVersion

func (p *PowerActorClaim) AsVersion(version model.Version) (interface{}, bool)

func (*PowerActorClaim) Persist

func (p *PowerActorClaim) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type PowerActorClaimList

type PowerActorClaimList []*PowerActorClaim

func (PowerActorClaimList) Persist

type PowerActorClaimV0

type PowerActorClaimV0 struct {
	Height          int64  `pg:",pk,notnull,use_zero"`
	MinerID         string `pg:",pk,notnull"`
	StateRoot       string `pg:",pk,notnull"`
	RawBytePower    string `pg:",notnull"`
	QualityAdjPower string `pg:",notnull"`
	// contains filtered or unexported fields
}

type PowerTaskResult

type PowerTaskResult struct {
	ChainPowerModel *ChainPower
	ClaimStateModel PowerActorClaimList
}

func (*PowerTaskResult) Persist

func (p *PowerTaskResult) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

Jump to

Keyboard shortcuts

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