migration2

package
v0.18.3-beta.rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrUninitializedDB signals that top-level buckets for the database
	// have not been initialized.
	ErrUninitializedDB = errors.New("db not initialized")

	// ErrCorruptChanSummary signals that the clients channel summary's
	// on-disk structure deviates from what is expected.
	ErrCorruptChanSummary = errors.New("channel summary corrupted")
)

Functions

func MigrateClientChannelDetails

func MigrateClientChannelDetails(tx kvdb.RwTx) error

MigrateClientChannelDetails creates a new channel-details bucket that uses channel IDs as sub-buckets where the channel summaries are moved to from the channel summary bucket. If the migration is successful then the channel summary bucket is deleted.

func UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type ChannelID

type ChannelID [32]byte

ChannelID is a series of 32-bytes that uniquely identifies all channels within the network. The ChannelID is computed using the outpoint of the funding transaction (the txid, and output index). Given a funding output the ChannelID can be calculated by XOR'ing the big-endian serialization of the txid and the big-endian serialization of the output index, truncated to 2 bytes.

func (ChannelID) String

func (c ChannelID) String() string

String returns the string representation of the ChannelID. This is just the hex string encoding of the ChannelID itself.

Jump to

Keyboard shortcuts

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