parameters

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0, BSD-2-Clause Imports: 5 Imported by: 8

Documentation

Index

Constants

View Source
const (
	PriorityDatabase = iota

	PriorityChains
	PriorityPeering
	PriorityNodeConnection
	PriorityWebAPI
	PriorityDBGarbageCollection
	PriorityMetrics
)
View Source
const MaxPayloadSize = iotago.BlockBinSerializedMaxSize -
	serializer.OneByte -
	serializer.OneByte -
	(iotago.BlockMaxParents * iotago.BlockIDLength) -
	serializer.UInt32ByteSize -

	serializer.UInt64ByteSize // Nonce

Variables

View Source
var (
	L1ForTesting = &L1Params{

		MaxPayloadSize: MaxPayloadSize,
		Protocol: &iotago.ProtocolParameters{
			Version:     tpkg.TestProtoParas.Version,
			NetworkName: tpkg.TestProtoParas.NetworkName,
			Bech32HRP:   tpkg.TestProtoParas.Bech32HRP,
			MinPoWScore: tpkg.TestProtoParas.MinPoWScore,
			RentStructure: iotago.RentStructure{
				VByteCost:    10,
				VBFactorData: 1,
				VBFactorKey:  1,
			},
			TokenSupply: tpkg.TestProtoParas.TokenSupply,
		},
		BaseToken: &BaseToken{
			Name:            "Iota",
			TickerSymbol:    "MIOTA",
			Unit:            "MIOTA",
			Subunit:         "IOTA",
			Decimals:        6,
			UseMetricPrefix: false,
		},
	}
)

Functions

func InitL1 added in v0.3.0

func InitL1(l1 *L1Params)

func InitL1Lazy added in v0.3.0

func InitL1Lazy(f func())

InitL1Lazy sets a function to be called the first time L1() is called. The function must call InitL1().

Types

type BaseToken added in v0.3.0

type BaseToken struct {
	Name            string
	TickerSymbol    string
	Unit            string
	Subunit         string
	Decimals        uint32
	UseMetricPrefix bool
}

type L1Params added in v0.3.0

type L1Params struct {
	MaxPayloadSize int
	Protocol       *iotago.ProtocolParameters
	BaseToken      *BaseToken
}

L1Params describes parameters coming from the L1Params node

func L1 added in v0.3.0

func L1() *L1Params

Jump to

Keyboard shortcuts

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