lightclients

package
v0.0.0-...-4097cb8 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LightClientsManager

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

LightClientsManager manages light clients of other shards and provides services for debt validation.

func NewLightClientManager

func NewLightClientManager(targetShard uint, context context.Context, config *node.Config, engine consensus.Engine) (*LightClientsManager, error)

NewLightClientManager create a new LightClientManager instance.

func NewLightClientManagerSubChain

func NewLightClientManagerSubChain(targetShard uint, context context.Context, config *node.Config, engine consensus.Engine) (*LightClientsManager, error)

NewLightClientManagerSubChain create a new LightClientManager instance.

func (*LightClientsManager) GetServices

func (manager *LightClientsManager) GetServices() []node.Service

GetServices get node service

func (*LightClientsManager) IfDebtPacked

func (manager *LightClientsManager) IfDebtPacked(debt *types.Debt) (packed bool, confirmed bool, retErr error)

IfDebtPacked indicates whether the specified debt is packed. returns packed whether debt is packed returns confirmed whether debt is confirmed returns retErr this error is return when debt is found invalid. which means we need remove this debt.

func (*LightClientsManager) ValidateDebt

func (manager *LightClientsManager) ValidateDebt(debt *types.Debt) (packed bool, confirmed bool, retErr error)

ValidateDebt validate debt returns packed whether debt is packed returns confirmed whether debt is confirmed returns retErr error info

Jump to

Keyboard shortcuts

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