config

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: GPL-3.0, GPL-3.0 Imports: 2 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
	Deployer       common.Address `toml:",omitempty"` // Address of the validator who deploys contract stored in bytecode
	Bytecode       string         `toml:",omitempty"` // Bytecode of validators contract // would like this type to be []byte but the unmarshalling is not working
	ABI            string         `toml:",omitempty"` // Json ABI of the contract

	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