Skip to content

Commit

Permalink
fix: sync
Browse files Browse the repository at this point in the history
  • Loading branch information
manavdesai27 committed Jul 8, 2023
1 parent 03c3987 commit 3c2471c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/net/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ class Pool extends EventEmitter {
this.filterSyncing = true;
const cFHeaderHeight = await this.chain.getCFHeaderHeight();
const startHeight = cFHeaderHeight
? cFHeaderHeight : 1;
? cFHeaderHeight + 1 : 1;
const chainHeight = await this.chain.height;
const stopHeight = chainHeight > 2000 ? 2000 : chainHeight;
const stopHash = await this.chain.getHash(stopHeight);
Expand All @@ -769,7 +769,7 @@ class Pool extends EventEmitter {
this.filterSyncing = true;
const cFilterHeight = await this.chain.getCFilterHeight();
const startHeight = cFilterHeight
? cFilterHeight : 1;
? cFilterHeight + 1 : 1;
const chainHeight = await this.chain.height;
const stopHeight = chainHeight > 1000 ? 1000 : chainHeight;
const stopHash = await this.chain.getHash(stopHeight);
Expand Down Expand Up @@ -1761,10 +1761,7 @@ class Pool extends EventEmitter {
return;

if (this.neutrino) {
const locator = await this.chain.getLocator();
this.sendLocator(locator, peer);
if (!this.syncing)
this.startFilterHeadersSync();
this.startSync();
return;
}

Expand Down Expand Up @@ -3668,9 +3665,6 @@ class Pool extends EventEmitter {
*/

getBlock(peer, hashes) {
if (this.options.neutrino)
return;

if (!this.opened)
return;

Expand Down

0 comments on commit 3c2471c

Please sign in to comment.