power

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0, MIT Imports: 8 Imported by: 0

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 added in v0.7.0

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 added in v0.4.0

type ChainPowerList []*ChainPower

ChainPowerList is a slice of ChainPowers for batch insertion.

func (ChainPowerList) Persist added in v0.5.0

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 added in v0.7.0

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 added in v0.3.0

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 added in v0.7.0

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

func (*PowerActorClaim) Persist added in v0.5.0

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

type PowerActorClaimList added in v0.3.0

type PowerActorClaimList []*PowerActorClaim

func (PowerActorClaimList) Persist added in v0.5.0

type PowerActorClaimV0 added in v0.7.0

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 added in v0.3.0

type PowerTaskResult struct {
	ChainPowerModel *ChainPower
	ClaimStateModel PowerActorClaimList
}

func (*PowerTaskResult) Persist added in v0.3.0

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