Skip to content

Commit

Permalink
Fastest server estimated height valuation
Browse files Browse the repository at this point in the history
  • Loading branch information
Milan-Cerovsky committed Sep 5, 2024
1 parent 2c7d871 commit dbfec4c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ internal class FastestServerFetcher(
return null
}

if (remoteInfo.estimatedHeight >= remoteInfo.blockHeightUnsafe.value + N) {
if (remoteInfo.estimatedHeight >= remoteInfo.blockHeightUnsafe.value + SYNCED_THRESHOLD_BLOCKS) {
logRuledOut("estimatedHeight does not match")
return null
}
Expand Down Expand Up @@ -240,3 +240,5 @@ private val LATENCY_THRESHOLD = 300.milliseconds
* Threshold for getBlockRange RPC call latency of latest [N] blocks.
*/
private val FETCH_THRESHOLD = 60.seconds

private const val SYNCED_THRESHOLD_BLOCKS = 288

0 comments on commit dbfec4c

Please sign in to comment.