Browse Source

fix(lnd): don't treat filters as filter headers

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.
renovate/lint-staged-8.x
Tom Kirkpatrick 7 years ago
parent
commit
d53335a43d
No known key found for this signature in database GPG Key ID: 72203A8EC5967EA8
  1. 8
      app/lib/lnd/neutrino.js

8
app/lib/lnd/neutrino.js

@ -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)

Loading…
Cancel
Save