Documentation ¶
Overview ¶
prove of authority.
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 ¶
- type RoundManager
- func (m *RoundManager) GetContract() common.Address
- func (m *RoundManager) GetHsMappingByRound(round uint32) (map[string]*ainterface.ValidatorInfo, error)
- func (m *RoundManager) GetNextRound(round *ainterface.Round) (*ainterface.Round, error)
- func (m *RoundManager) GetRoundInterval(round int64) int64
- func (m *RoundManager) GetValidators(blockHash common.Hash, round uint32, fn ainterface.GetValidatorsCallBack) ([]*common.Address, map[common.Address]uint16, error)
- func (m *RoundManager) Halt()
- func (m *RoundManager) HasValidator(validator common.Address) bool
- func (m *RoundManager) Init(round uint32, db database.Transactor, c ainterface.IBtcClient) error
- func (m *RoundManager) Start()
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoundManager ¶
type RoundManager struct { }
manage how validators will create blocks within a round. validators may change between different round.
func NewRoundManager ¶
func NewRoundManager() *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 (m *RoundManager) Init(round uint32, db database.Transactor, c ainterface.IBtcClient) error
func (*RoundManager) Start ¶
func (m *RoundManager) Start()
type Service ¶
prove of authority. using round robin algorithm to generate blocks with orders in the list of authority peers. this consensus is used by sub chain using asimov. please refer to the white paper of asimov.
func (*Service) GetRoundInterval ¶
Click to show internal directories.
Click to hide internal directories.