} | } | ||||
function getPollDelayAtHeight(height) { | function getPollDelayAtHeight(height) { | ||||
let blocksUntilHalving = HALVING_PERIOD - (height % HALVING_PERIOD); | |||||
if (blocksUntilHalving <= 1) { | |||||
return 1000; | |||||
} else if (blocksUntilHalving == 2) { | |||||
let blocksUntilHalving = calcNextHalvingHeight() - height; | |||||
if (blocksUntilHalving <= 2) { | |||||
return 2500; | return 2500; | ||||
} else { | } else { | ||||
return 10000; | return 10000; |