service

package
v0.0.0-...-5ecede5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: LGPL-3.0-or-later Imports: 15 Imported by: 0

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

func (*NodeActualizer) Run

func (n *NodeActualizer) Run()

Run is starting node monitoring

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

type PauseType

type PauseType int
const (
	NoPause PauseType = 0

	PauseTypeUpdatingBlockchain PauseType = 1 + iota
	PauseTypeStopingNetwork
)

func NodePauseType

func NodePauseType() PauseType

Jump to

Keyboard shortcuts

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