Skip to content

Commit

Permalink
fix(core-p2p): strict greater than (#4121)
Browse files Browse the repository at this point in the history
  • Loading branch information
air1one authored Oct 22, 2020
1 parent f67cee3 commit 8006a8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core-p2p/src/socket-server/versions/peer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const getBlocks = async ({ req }): Promise<Interfaces.IBlockData[] | Data
const reqHeadersOnly: boolean = !!req.data.headersOnly;

const lastHeight: number = app.resolvePlugin<Blockchain.IBlockchain>("blockchain").getLastHeight();
if (reqBlockHeight >= lastHeight) {
if (reqBlockHeight > lastHeight) {
return [];
}

Expand Down

0 comments on commit 8006a8d

Please sign in to comment.