valset

package
v1.10.26-stable Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

type Validator struct {
	Address          common.Address `json:"signer"`
	VotingPower      int64          `json:"power"`
	ProposerPriority int64          `json:"accum"`
}

Validator represets Volatile state for each Validator

func (*Validator) Cmp

func (v *Validator) Cmp(other *Validator) *Validator

Cmp returns the one validator with a higher ProposerPriority. If ProposerPriority is same, it returns the validator with lexicographically smaller address

func (*Validator) Copy

func (v *Validator) Copy() *Validator

Copy creates a new copy of the validator so we can mutate ProposerPriority. Panics if the validator is nil.

func (*Validator) HeaderBytes

func (v *Validator) HeaderBytes() []byte

HeaderBytes return header bytes

func (*Validator) PowerBytes

func (v *Validator) PowerBytes() []byte

PowerBytes return power bytes

func (*Validator) String

func (v *Validator) String() string

Jump to

Keyboard shortcuts

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