Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix(lnd): don't treat filters as filter headers
Browse files Browse the repository at this point in the history
During the sync process there are log message that relate to syncing
filters and filter headers. This fixes an issue where we were parsing
messages about syncing filters as if they were filter headers, which
would cause the progress indicator to jump around during the middle of
the sync process due to it thinking that more filter headers had been
synced than was actually the case.
  • Loading branch information
mrfelton committed Aug 19, 2018
1 parent 8457549 commit d53335a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/lib/lnd/neutrino.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,12 @@ class Neutrino extends EventEmitter {
height = match[1]
} else if ((match = line.match(/Got cfheaders from height=(\d*) to height=(\d+)/))) {
cfilter = match[2]
} else if ((match = line.match(/Writing filter headers up to height=(\d*)/))) {
cfilter = match[1]
} else if ((match = line.match(/Verified \d* filter headers? in the.+\(height (\d+)/))) {
cfilter = match[1]
}

if (!this.lndCfilterHeight || this.lndCfilterHeight > this.currentBlockHeight - 10000) {
if ((match = line.match(/Fetching filter for height=(\d+)/))) {
cfilter = match[1]
}
}

if (height) {
this.setState(CHAIN_SYNC_IN_PROGRESS)
this.setLndBlockHeight(height)
Expand Down

0 comments on commit d53335a

Please sign in to comment.