Versions in this module Expand all Collapse all v0 v0.0.3 Sep 11, 2024 Changes in this version + const DefaultChannelUpdateInterval + const DefaultDelayedQueryReplyInterval + const DefaultHistoricalSyncInterval + const DefaultMaxChannelUpdateBurst + const DefaultMaxUndelayedQueryReplies + const DefaultSubBatchDelay + const DefaultSyncerRotationInterval + var ErrCorruptedMessageStore = errors.New(...) + var ErrGossipSyncerExiting = errors.New("gossip syncer exiting") + var ErrGossipSyncerNotFound = errors.New("gossip syncer not found") + var ErrGossiperShuttingDown = errors.New("gossiper is shutting down") + var ErrSyncManagerExiting = errors.New("sync manager exiting") + var ErrSyncTransitionTimeout = errors.New(...) + var ErrUnsupportedMessage = errors.New("unsupported message type") + func DisableLog() + func IsKeepAliveUpdate(update *lnwire.ChannelUpdate, prev *models.ChannelEdgePolicy) bool + func MultiSourceBootstrap(ignore map[autopilot.NodeID]struct{}, numAddrs uint32, ...) ([]*lnwire.NetAddress, error) + func UseLogger(logger btclog.Logger) + type AuthenticatedGossiper struct + func New(cfg Config, selfKeyDesc *keychain.KeyDescriptor) *AuthenticatedGossiper + func (d *AuthenticatedGossiper) InitSyncState(syncPeer lnpeer.Peer) + func (d *AuthenticatedGossiper) ProcessLocalAnnouncement(msg lnwire.Message, optionalFields ...OptionalMsgField) chan error + func (d *AuthenticatedGossiper) ProcessRemoteAnnouncement(msg lnwire.Message, peer lnpeer.Peer) chan error + func (d *AuthenticatedGossiper) PropagateChanPolicyUpdate(edgesToUpdate []EdgeWithInfo) error + func (d *AuthenticatedGossiper) PruneSyncState(peer route.Vertex) + func (d *AuthenticatedGossiper) Start() error + func (d *AuthenticatedGossiper) Stop() error + func (d *AuthenticatedGossiper) SyncManager() *SyncManager + type ChanSeries struct + func NewChanSeries(graph *channeldb.ChannelGraph) *ChanSeries + func (c *ChanSeries) FetchChanAnns(chain chainhash.Hash, shortChanIDs []lnwire.ShortChannelID) ([]lnwire.Message, error) + func (c *ChanSeries) FetchChanUpdates(chain chainhash.Hash, shortChanID lnwire.ShortChannelID) ([]*lnwire.ChannelUpdate, error) + func (c *ChanSeries) FilterChannelRange(_ chainhash.Hash, startHeight, endHeight uint32, withTimestamps bool) ([]channeldb.BlockChannelRange, error) + func (c *ChanSeries) FilterKnownChanIDs(_ chainhash.Hash, superSet []channeldb.ChannelUpdateInfo, ...) ([]lnwire.ShortChannelID, error) + func (c *ChanSeries) HighestChanID(chain chainhash.Hash) (*lnwire.ShortChannelID, error) + func (c *ChanSeries) UpdatesInHorizon(chain chainhash.Hash, startTime time.Time, endTime time.Time) ([]lnwire.Message, error) + type ChannelGraphBootstrapper struct + func (c *ChannelGraphBootstrapper) Name() string + func (c *ChannelGraphBootstrapper) SampleNodeAddrs(numAddrs uint32, ignore map[autopilot.NodeID]struct{}) ([]*lnwire.NetAddress, error) + type ChannelGraphTimeSeries interface + FetchChanAnns func(chain chainhash.Hash, shortChanIDs []lnwire.ShortChannelID) ([]lnwire.Message, error) + FetchChanUpdates func(chain chainhash.Hash, shortChanID lnwire.ShortChannelID) ([]*lnwire.ChannelUpdate, error) + FilterChannelRange func(chain chainhash.Hash, startHeight, endHeight uint32, withTimestamps bool) ([]channeldb.BlockChannelRange, error) + FilterKnownChanIDs func(chain chainhash.Hash, superSet []channeldb.ChannelUpdateInfo, ...) ([]lnwire.ShortChannelID, error) + HighestChanID func(chain chainhash.Hash) (*lnwire.ShortChannelID, error) + UpdatesInHorizon func(chain chainhash.Hash, startTime time.Time, endTime time.Time) ([]lnwire.Message, error) + type Config struct + ActiveSyncerTimeoutTicker ticker.Ticker + AnnSigner lnwallet.MessageSigner + Broadcast func(skips map[route.Vertex]struct{}, msg ...lnwire.Message) error + ChainHash chainhash.Hash + ChanSeries ChannelGraphTimeSeries + ChannelUpdateInterval time.Duration + FetchSelfAnnouncement func() lnwire.NodeAnnouncement + FindBaseByAlias func(alias lnwire.ShortChannelID) (lnwire.ShortChannelID, error) + FindChannel func(node *btcec.PublicKey, chanID lnwire.ChannelID) (*channeldb.OpenChannel, error) + GetAlias func(lnwire.ChannelID) (lnwire.ShortChannelID, error) + HistoricalSyncTicker ticker.Ticker + IgnoreHistoricalFilters bool + IsAlias func(scid lnwire.ShortChannelID) bool + IsStillZombieChannel func(time.Time, time.Time) bool + MaxChannelUpdateBurst int + MessageStore GossipMessageStore + MinimumBatchSize int + NoTimestampQueries bool + Notifier chainntnfs.ChainNotifier + NotifyWhenOffline func(peerPubKey [33]byte) <-chan struct{} + NotifyWhenOnline func(peerPubKey [33]byte, peerChan chan<- lnpeer.Peer) + NumActiveSyncers int + PinnedSyncers PinnedSyncers + ProofMatureDelta uint32 + RebroadcastInterval time.Duration + RetransmitTicker ticker.Ticker + RotateTicker ticker.Ticker + Router routing.ChannelGraphSource + SignAliasUpdate func(u *lnwire.ChannelUpdate) (*ecdsa.Signature, error) + SubBatchDelay time.Duration + TrickleDelay time.Duration + UpdateSelfAnnouncement func() (lnwire.NodeAnnouncement, error) + WaitingProofStore *channeldb.WaitingProofStore + type DNSSeedBootstrapper struct + func (d *DNSSeedBootstrapper) Name() string + func (d *DNSSeedBootstrapper) SampleNodeAddrs(numAddrs uint32, ignore map[autopilot.NodeID]struct{}) ([]*lnwire.NetAddress, error) + type EdgeWithInfo struct + Edge *models.ChannelEdgePolicy + Info *models.ChannelEdgeInfo + type GossipMessageStore interface + AddMessage func(lnwire.Message, [33]byte) error + DeleteMessage func(lnwire.Message, [33]byte) error + Messages func() (map[[33]byte][]lnwire.Message, error) + MessagesForPeer func([33]byte) ([]lnwire.Message, error) + Peers func() (map[[33]byte]struct{}, error) + type GossipSyncer struct + func (g *GossipSyncer) ApplyGossipFilter(filter *lnwire.GossipTimestampRange) error + func (g *GossipSyncer) FilterGossipMsgs(msgs ...msgWithSenders) + func (g *GossipSyncer) ProcessQueryMsg(msg lnwire.Message, peerQuit <-chan struct{}) error + func (g *GossipSyncer) ProcessSyncTransition(newSyncType SyncerType) error + func (g *GossipSyncer) ResetSyncedSignal() chan struct{} + func (g *GossipSyncer) Start() + func (g *GossipSyncer) Stop() + func (g *GossipSyncer) SyncType() SyncerType + type MessageStore struct + func NewMessageStore(db kvdb.Backend) (*MessageStore, error) + func (s *MessageStore) AddMessage(msg lnwire.Message, peerPubKey [33]byte) error + func (s *MessageStore) DeleteMessage(msg lnwire.Message, peerPubKey [33]byte) error + func (s *MessageStore) Messages() (map[[33]byte][]lnwire.Message, error) + func (s *MessageStore) MessagesForPeer(peerPubKey [33]byte) ([]lnwire.Message, error) + func (s *MessageStore) Peers() (map[[33]byte]struct{}, error) + type NetworkPeerBootstrapper interface + Name func() string + SampleNodeAddrs func(numAddrs uint32, ignore map[autopilot.NodeID]struct{}) ([]*lnwire.NetAddress, error) + func NewDNSSeedBootstrapper(seeds [][2]string, net tor.Net, timeout time.Duration) NetworkPeerBootstrapper + func NewGraphBootstrapper(cg autopilot.ChannelGraph) (NetworkPeerBootstrapper, error) + type OptionalMsgField func(*optionalMsgFields) + func ChannelCapacity(capacity btcutil.Amount) OptionalMsgField + func ChannelPoint(op wire.OutPoint) OptionalMsgField + func RemoteAlias(alias *lnwire.ShortChannelID) OptionalMsgField + type PinnedSyncers map[route.Vertex]struct + type SyncManager struct + func (m *SyncManager) GossipSyncer(peer route.Vertex) (*GossipSyncer, bool) + func (m *SyncManager) GossipSyncers() map[route.Vertex]*GossipSyncer + func (m *SyncManager) InitSyncState(peer lnpeer.Peer) error + func (m *SyncManager) IsGraphSynced() bool + func (m *SyncManager) PruneSyncState(peer route.Vertex) + func (m *SyncManager) Start() + func (m *SyncManager) Stop() + type SyncManagerCfg struct + BestHeight func() uint32 + ChainHash chainhash.Hash + ChanSeries ChannelGraphTimeSeries + HistoricalSyncTicker ticker.Ticker + IgnoreHistoricalFilters bool + IsStillZombieChannel func(time.Time, time.Time) bool + NoTimestampQueries bool + NumActiveSyncers int + PinnedSyncers PinnedSyncers + RotateTicker ticker.Ticker + type SyncerType uint8 + const ActiveSync + const PassiveSync + const PinnedSync + func (t SyncerType) IsActiveSync() bool + func (t SyncerType) String() string