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 ¶
- 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 SoloService
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 (m *RoundManager) Init(round uint32, db database.Transactor, c ainterface.IBtcClient) error
func (*RoundManager) Start ¶
func (m *RoundManager) Start()
type SoloService ¶
* 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
Click to show internal directories.
Click to hide internal directories.