config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: GPL-3.0, GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RequestTimeout uint64         `toml:",omitempty"` // The timeout for each Istanbul round in milliseconds.
	BlockPeriod    uint64         `toml:",omitempty"` // Default minimum difference between two consecutive block's timestamps in second
	ProposerPolicy ProposerPolicy `toml:",omitempty"` // The policy for proposer selection
	Epoch          uint64         `toml:",omitempty"` // The number of blocks after which to checkpoint and reset the pending votes

	sync.RWMutex
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) GetProposerPolicy

func (cfg *Config) GetProposerPolicy() ProposerPolicy

func (*Config) SetProposerPolicy

func (cfg *Config) SetProposerPolicy(p ProposerPolicy)

type ProposerPolicy

type ProposerPolicy uint64
const (
	RoundRobin ProposerPolicy = iota
	Sticky
)

Jump to

Keyboard shortcuts

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