subnet

package
v0.0.0-...-79ba347 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prm

type Prm struct {
	SubnetClient *morphsubnet.Client
}

Prm groups the required parameters of the Validator's constructor.

All values must comply with the requirements imposed on them. Passing incorrect parameter values will result in constructor failure (error or panic depending on the implementation).

type Validator

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

Validator is an utility that verifies node subnet allowance.

For correct operation, Validator must be created using the constructor (New). After successful creation, the Validator is immediately ready to work through API.

func New

func New(prm Prm) (*Validator, error)

New creates a new instance of the Validator.

The created Validator does not require additional initialization and is completely ready for work.

func (*Validator) VerifyAndUpdate

func (v *Validator) VerifyAndUpdate(n *netmap.NodeInfo) error

VerifyAndUpdate calls subnet contract's `NodeAllowed` method. Removes subnets that have not been approved by the contract.

Jump to

Keyboard shortcuts

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