mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 22:58:30 +01:00
stop for loop after genesis block
prevHash == undefined for the genesis block
This commit is contained in:
parent
e581ef7fe3
commit
e8986e5fdc
1 changed files with 1 additions and 1 deletions
|
@ -567,7 +567,7 @@ class Routes {
|
|||
}
|
||||
|
||||
let nextHash = startFromHash;
|
||||
for (let i = 0; i < 10; i++) {
|
||||
for (let i = 0; i < 10 && nextHash; i++) {
|
||||
const localBlock = blocks.getBlocks().find((b) => b.id === nextHash);
|
||||
if (localBlock) {
|
||||
returnBlocks.push(localBlock);
|
||||
|
|
Loading…
Add table
Reference in a new issue