migrator

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpNodesToFile

func DumpNodesToFile(nodes []SerializableNode, outFile string) error

func WriteToRegistry

func WriteToRegistry(
	logger *zap.Logger,
	nodes []SerializableNode,
	chainAdmin blockchain.INodeRegistryAdmin,
) error

Types

type SerializableNode

type SerializableNode struct {
	NodeID                    uint32 `json:"node_id"`
	OwnerAddress              string `json:"owner_address"`
	SigningKeyPub             string `json:"signing_key_pub"`
	HttpAddress               string `json:"http_address"`
	MinMonthlyFeeMicroDollars int64  `json:"min_monthly_fee_micro_dollars"`
	InCanonicalNetwork        bool   `json:"in_canonical_network"`
}

func ImportNodesFromFile

func ImportNodesFromFile(filePath string) ([]SerializableNode, error)

func ReadFromRegistry

func ReadFromRegistry(chainCaller blockchain.INodeRegistryCaller) ([]SerializableNode, error)

Jump to

Keyboard shortcuts

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