libcons

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ErrConsensusNotAchieved = liberr.Error("evm: consensus not achieved")

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkable

type Checkable interface {
	GetValAddress() sdk.ValAddress
}

type ConsensusChecker

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

func (ConsensusChecker) VerifyEvidence

func (c ConsensusChecker) VerifyEvidence(ctx context.Context, evidences []Evidence) (*Result, error)

func (ConsensusChecker) VerifyGasEstimates

func (c ConsensusChecker) VerifyGasEstimates(ctx context.Context, p liblog.LogProvider, estimates []GasEstimate) (uint64, error)

type Evidence

type Evidence interface {
	Checkable
	GetProof() *codectypes.Any
}

type GasEstimate

type GasEstimate interface {
	Checkable
	GetValue() uint64
}

type Result

type Result struct {
	Winner       any
	TotalShares  sdkmath.Int
	TotalVotes   sdkmath.Int
	Distribution map[string]sdkmath.Int
}

type SnapshotProvider

type SnapshotProvider func(context.Context) (*valsettypes.Snapshot, error)

Jump to

Keyboard shortcuts

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