solo

package
v0.0.0-...-7ee7fde Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Copyright (c) 2018-2020. The asimov developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoundManager

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

func NewRoundManager

func NewRoundManager(addrs []*common.Address) *RoundManager

func (*RoundManager) GetContract

func (m *RoundManager) GetContract() common.Address

func (*RoundManager) GetHsMappingByRound

func (m *RoundManager) GetHsMappingByRound(round uint32) (map[string]*ainterface.ValidatorInfo, error)

func (*RoundManager) GetNextRound

func (m *RoundManager) GetNextRound(round *ainterface.Round) (*ainterface.Round, error)

func (*RoundManager) GetRoundInterval

func (m *RoundManager) GetRoundInterval(round int64) int64

func (*RoundManager) GetValidators

func (m *RoundManager) GetValidators(blockHash common.Hash, round uint32, fn ainterface.GetValidatorsCallBack) (
	[]*common.Address, map[common.Address]uint16, error)

func (*RoundManager) Halt

func (m *RoundManager) Halt()

func (*RoundManager) HasValidator

func (m *RoundManager) HasValidator(validator common.Address) bool

func (*RoundManager) Init

func (*RoundManager) Start

func (m *RoundManager) Start()

type SoloService

type SoloService struct {
	sync.Mutex
	// contains filtered or unexported fields
}

* Simple consensus for solo node in test environment.

func NewSoloService

func NewSoloService(config *params.Config) (*SoloService, error)

* create Solo Service

func (*SoloService) GetRoundInterval

func (s *SoloService) GetRoundInterval() int64

func (*SoloService) Halt

func (s *SoloService) Halt() error

func (*SoloService) Start

func (s *SoloService) Start() error

Jump to

Keyboard shortcuts

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