ibft

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	VoteAdd    = "ADD"
	VoteRemove = "REMOVE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IBFTCandidate

type IBFTCandidate struct {
	Address string `json:"address"`
	Vote    Vote   `json:"vote"`
}

type IBFTCandidatesResult

type IBFTCandidatesResult struct {
	Candidates []IBFTCandidate `json:"candidates"`
}

func NewIBFTCandidatesResult

func NewIBFTCandidatesResult(resp *ibftOp.CandidatesResp) *IBFTCandidatesResult

func (*IBFTCandidatesResult) Output

func (r *IBFTCandidatesResult) Output() string

type IBFTProposeResult

type IBFTProposeResult struct {
	Address string `json:"-"`
	Vote    string `json:"-"`
}

func (*IBFTProposeResult) MarshalJSON

func (r *IBFTProposeResult) MarshalJSON() ([]byte, error)

func (*IBFTProposeResult) Message

func (r *IBFTProposeResult) Message() string

func (*IBFTProposeResult) Output

func (r *IBFTProposeResult) Output() string

type IBFTSnapshotResult

type IBFTSnapshotResult struct {
	Number     uint64             `json:"number"`
	Hash       string             `json:"hash"`
	Votes      []IBFTSnapshotVote `json:"votes"`
	Validators []string           `json:"validators"`
}

func NewIBFTSnapshotResult

func NewIBFTSnapshotResult(resp *ibftOp.Snapshot) *IBFTSnapshotResult

func (*IBFTSnapshotResult) Output

func (r *IBFTSnapshotResult) Output() string

type IBFTSnapshotVote

type IBFTSnapshotVote struct {
	Proposer string `json:"proposer"`
	Address  string `json:"address"`
	Vote     Vote   `json:"vote"`
}

type IBFTStatusResult

type IBFTStatusResult struct {
	ValidatorKey string `json:"validator_key"`
}

func (*IBFTStatusResult) Output

func (r *IBFTStatusResult) Output() string

type IbftCandidates

type IbftCandidates struct {
	helper.Base
	Formatter *helper.FormatterFlag
	GRPC      *helper.GRPCFlag
}

IbftCandidates is the command to get a current list of IBFT candidates and their corresponding votes

func (*IbftCandidates) DefineFlags

func (c *IbftCandidates) DefineFlags()

DefineFlags defines the command flags

func (*IbftCandidates) GetBaseCommand

func (c *IbftCandidates) GetBaseCommand() string

func (*IbftCandidates) GetHelperText

func (c *IbftCandidates) GetHelperText() string

GetHelperText returns a simple description of the command

func (*IbftCandidates) Help

func (c *IbftCandidates) Help() string

Help implements the cli.IbftCandidates interface

func (*IbftCandidates) Run

func (c *IbftCandidates) Run(args []string) int

Run implements the cli.IbftCandidates interface

func (*IbftCandidates) Synopsis

func (c *IbftCandidates) Synopsis() string

Synopsis implements the cli.IbftCandidates interface

type IbftCommand

type IbftCommand struct {
}

IbftCommand is the top level ibft command

func (*IbftCommand) GetBaseCommand

func (c *IbftCommand) GetBaseCommand() string

func (*IbftCommand) Help

func (c *IbftCommand) Help() string

Help implements the cli.Command interface

func (*IbftCommand) Run

func (c *IbftCommand) Run(args []string) int

Run implements the cli.Command interface

func (*IbftCommand) Synopsis

func (c *IbftCommand) Synopsis() string

Synopsis implements the cli.Command interface

type IbftPropose

type IbftPropose struct {
	helper.Base
	Formatter *helper.FormatterFlag
	GRPC      *helper.GRPCFlag
}

IbftPropose is the command to propose a candidate and cast a vote for addition / removal from the validator set

func (*IbftPropose) DefineFlags

func (p *IbftPropose) DefineFlags()

DefineFlags defines the command flags

func (*IbftPropose) GetBaseCommand

func (p *IbftPropose) GetBaseCommand() string

func (*IbftPropose) GetHelperText

func (p *IbftPropose) GetHelperText() string

GetHelperText returns a simple description of the command

func (*IbftPropose) Help

func (p *IbftPropose) Help() string

Help implements the cli.IbftPropose interface

func (*IbftPropose) Run

func (p *IbftPropose) Run(args []string) int

Run implements the cli.IbftPropose interface

func (*IbftPropose) Synopsis

func (p *IbftPropose) Synopsis() string

Synopsis implements the cli.IbftPropose interface

type IbftSnapshot

type IbftSnapshot struct {
	helper.Base
	Formatter *helper.FormatterFlag
	GRPC      *helper.GRPCFlag
}

IbftSnapshot is the command to query the snapshot

func (*IbftSnapshot) DefineFlags

func (p *IbftSnapshot) DefineFlags()

DefineFlags defines the command flags

func (*IbftSnapshot) GetBaseCommand

func (p *IbftSnapshot) GetBaseCommand() string

func (*IbftSnapshot) GetHelperText

func (p *IbftSnapshot) GetHelperText() string

GetHelperText returns a simple description of the command

func (*IbftSnapshot) Help

func (p *IbftSnapshot) Help() string

Help implements the cli.IbftSnapshot interface

func (*IbftSnapshot) Run

func (p *IbftSnapshot) Run(args []string) int

Run implements the cli.IbftSnapshot interface

func (*IbftSnapshot) Synopsis

func (p *IbftSnapshot) Synopsis() string

Synopsis implements the cli.IbftSnapshot interface

type IbftStatus

type IbftStatus struct {
	helper.Base
	Formatter *helper.FormatterFlag
	GRPC      *helper.GRPCFlag
}

IbftStatus is the command to query the snapshot

func (*IbftStatus) DefineFlags

func (p *IbftStatus) DefineFlags()

DefineFlags defines the command flags

func (*IbftStatus) GetBaseCommand

func (p *IbftStatus) GetBaseCommand() string

func (*IbftStatus) GetHelperText

func (p *IbftStatus) GetHelperText() string

GetHelperText returns a simple description of the command

func (*IbftStatus) Help

func (p *IbftStatus) Help() string

Help implements the cli.IbftStatus interface

func (*IbftStatus) Run

func (p *IbftStatus) Run(args []string) int

Run implements the cli.IbftStatus interface

func (*IbftStatus) Synopsis

func (p *IbftStatus) Synopsis() string

Synopsis implements the cli.IbftStatus interface

type Vote

type Vote string

Jump to

Keyboard shortcuts

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