Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelsWatcher ¶
type ChannelsWatcher struct {
// contains filtered or unexported fields
}
ChannelsWatcher contains all the data that is needed in order to scan several input scripts using neutrino compact filters download and matching. This is usefull to run as a background job that scans periodically all the user opened channels funding points, detect a possible closed channel and warn the user if a the channel was ulitirally found.
func NewChannelsWatcher ¶
func NewChannelsWatcher( workingDir string, chainService *neutrino.ChainService, log btclog.Logger, db *jobDB, quitChan chan struct{}) (*ChannelsWatcher, error)
NewChannelsWatcher creates a new ChannelsWatcher. First it makes sure it has a valid ChainService and then fetches all the input scripts from the user channels needed to be watched.
func (*ChannelsWatcher) Scan ¶
func (b *ChannelsWatcher) Scan(tipHeight uint64) (bool, error)
Scan scans from the last saved point up to the tipHeight given as parameter. it scans for all watchedScripts and if the ChainService notifies on a filter match this function returns true to reflect that a closed channel was detected and the user should be warned.
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
Job contains a running job info.
func NewJob ¶
NewJob crates a new SyncJob and given a directory for this job. It is assumed that a config file exists in this directory.