common

package
v2.0.0-beta.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 1 Imported by: 7

Documentation

Index

Constants

View Source
const (
	StorePrefixSnapshot           byte = 1
	StorePrefixBlocks             byte = 2
	StorePrefixBlockMetadata      byte = 3
	StorePrefixMilestoneIndexes   byte = 4
	StorePrefixMilestones         byte = 5
	StorePrefixChildren           byte = 6
	StorePrefixUnreferencedBlocks byte = 7
	StorePrefixProtocol           byte = 8
	StorePrefixHealth             byte = 255
)

Variables

View Source
var (
	// ErrCritical is returned when a critical error stops the execution of a task.
	ErrCritical = errors.New("critical error")
	// ErrOperationAborted is returned when the operation was aborted e.g. by a shutdown signal.
	ErrOperationAborted = errors.New("operation was aborted")
	// ErrBlockNotFound is returned when a block was not found.
	ErrBlockNotFound = errors.New("block not found")
	// ErrNodeNotSynced is returned when the node is not synchronized.
	ErrNodeNotSynced = errors.New("node is not synchronized")
	// ErrSnapshotInfoNotFound is returned when the snapshot info is not found in the database.
	ErrSnapshotInfoNotFound = errors.New("snapshot info not found")
)

Functions

func CriticalError

func CriticalError(err error) error

CriticalError wraps the given error as a critical error.

func IsCriticalError

func IsCriticalError(err error) error

IsCriticalError unwraps the inner error held by the critical error if the given error is a critical error. If the given error is not a critical error, nil is returned.

func IsSoftError

func IsSoftError(err error) error

IsSoftError unwraps the inner error held by the soft error if the given error is a soft error. If the given error is not a soft error, nil is returned.

func SoftError

func SoftError(err error) error

SoftError wraps the given error as a soft error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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