fix bestHeight bug

This commit is contained in:
tenthirtyone 2017-08-23 11:17:49 -04:00
parent 52ebe7dde0
commit c560ae3cff

View File

@ -9,6 +9,7 @@ let bestBlockHeight = 0;
// 1e9 limit = ~2M years from now
// Mostly for sync to set height
function bestHeight(height) {
height = parseInt(height, 10) || 0;
if (Number.isInteger(height) &&
height > 0 &&
height < 1 * 1e9) {