migration7

package
v0.16.1-beta Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const SessionIDSize = 33

SessionIDSize is 33-bytes; it is a serialized, compressed public key.

Variables

View Source
var (

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

	// ErrCorruptClientSession signals that the client session's on-disk
	// structure deviates from what is expected.
	ErrCorruptClientSession = errors.New("client session corrupted")
)

Functions

func MigrateChannelToSessionIndex

func MigrateChannelToSessionIndex(tx kvdb.RwTx) error

MigrateChannelToSessionIndex migrates the tower client DB to add an index from channel-to-session. This will make it easier in future to check which sessions have updates for which channels.

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.

type SessionID

type SessionID [SessionIDSize]byte

SessionID is created from the remote public key of a client, and serves as a unique identifier and authentication for sending state updates.

func (SessionID) String

func (s SessionID) String() string

String returns a hex encoding of the session id.

Jump to

Keyboard shortcuts

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