Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultBlockchainGap int64 = 10
DefaultBlockchainGap is default value for the number of lagging blocks
Variables ¶
This section is empty.
Functions ¶
func InitNodesBanService ¶
func InitNodesBanService() error
InitNodesBanService initializing nodes ban storage
func IsNodePaused ¶
func IsNodePaused() bool
func NodeDoneUpdatingBlockchain ¶
func NodeDoneUpdatingBlockchain()
func PauseNodeActivity ¶
func PauseNodeActivity(pt PauseType)
Types ¶
type NodeActualizer ¶
type NodeActualizer struct {
// contains filtered or unexported fields
}
func NewNodeActualizer ¶
func NewNodeActualizer(availableBlockchainGap int64) NodeActualizer
type NodePaused ¶
type NodePaused struct { PauseType PauseType // contains filtered or unexported fields }
func (*NodePaused) Get ¶
func (np *NodePaused) Get() PauseType
func (*NodePaused) IsSet ¶
func (np *NodePaused) IsSet() bool
func (*NodePaused) Set ¶
func (np *NodePaused) Set(pt PauseType)
func (*NodePaused) Unset ¶
func (np *NodePaused) Unset()
type NodeRelevanceService ¶
type NodeRelevanceService struct {
// contains filtered or unexported fields
}
func NewNodeRelevanceService ¶
func NewNodeRelevanceService(availableBlockchainGap int64, checkingInterval time.Duration) NodeRelevanceService
func (*NodeRelevanceService) Run ¶
func (n *NodeRelevanceService) Run()
Run is starting node monitoring
type NodesBanService ¶
type NodesBanService struct {
// contains filtered or unexported fields
}
func GetNodesBanService ¶
func GetNodesBanService() *NodesBanService
GetNodesBanService is returning nodes ban service
func (*NodesBanService) IsBanned ¶
func (nbs *NodesBanService) IsBanned(node syspar.FullNode) bool
IsBanned is allows to check node ban (local or global)
func (*NodesBanService) RegisterBadBlock ¶
func (nbs *NodesBanService) RegisterBadBlock(node syspar.FullNode, badBlockId, blockTime int64, reason string) error
RegisterBadBlock is set node to local ban and saving bad block to global registry
Click to show internal directories.
Click to hide internal directories.