history

package
v0.0.0-...-9a3af51 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelSync

type ChannelSync struct {
	// contains filtered or unexported fields
}

func NewChannelSync

func NewChannelSync(nodes []*common.Node, store Store) *ChannelSync

func (*ChannelSync) ChannelsSynchronize

func (s *ChannelSync) ChannelsSynchronize(ctx context.Context)

type ChannelUpdate

type ChannelUpdate struct {
	NodeID        []byte
	PeerId        []byte
	AliasScid     *lightning.ShortChannelID
	ConfirmedScid *lightning.ShortChannelID
	ChannelPoint  *wire.OutPoint
	LastUpdate    time.Time
}

type Forward

type Forward struct {
	Identifier   string
	InChannel    lightning.ShortChannelID
	OutChannel   lightning.ShortChannelID
	InMsat       uint64
	OutMsat      uint64
	ResolvedTime time.Time
}

type OpenChannelHtlc

type OpenChannelHtlc struct {
	NodeId             []byte
	PeerId             []byte
	ChannelPoint       *wire.OutPoint
	OriginalAmountMsat uint64
	ForwardAmountMsat  uint64
	IncomingAmountMsat uint64
	ForwardTime        time.Time
}

type Store

type Store interface {
	UpdateChannels(ctx context.Context, updates []*ChannelUpdate) error
	InsertForwards(ctx context.Context, forwards []*Forward, nodeId []byte) error
	UpdateForwards(ctx context.Context, forwards []*Forward, nodeId []byte) error
	FetchClnForwardOffsets(ctx context.Context, nodeId []byte) (uint64, uint64, error)
	SetClnForwardOffsets(ctx context.Context, nodeId []byte, created uint64, updated uint64) error
	FetchLndForwardOffset(ctx context.Context, nodeId []byte) (*time.Time, error)
	AddOpenChannelHtlc(ctx context.Context, htlc *OpenChannelHtlc) error
}

Jump to

Keyboard shortcuts

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