Skip to content

Commit

Permalink
default case of min should be Infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
ecioppettini committed Dec 5, 2023
1 parent d63f1f1 commit 91c3247
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/engine/paima-runtime/src/cde-config/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getEarliestStartBlockheight(config: ChainDataExtension[]): numbe
return Math.min(min, cde.startBlockHeight);
}
return min;
}, 0);
}, Infinity);
return isFinite(minStartBlockheight) ? minStartBlockheight : -1;
}

Expand All @@ -20,7 +20,7 @@ export function getEarliestStartSlot(config: ChainDataExtension[]): number {
return Math.min(min, cde.startSlot);
}
return min;
}, 0);
}, Infinity);
return isFinite(minStartSlot) ? minStartSlot : -1;
}

Expand Down

0 comments on commit 91c3247

Please sign in to comment.