difficulty: force int type to ceil() for php 7.x

This commit is contained in:
Tanguy Pruvot 2017-08-24 14:32:15 +02:00
parent e829478835
commit 369b6530a1

View file

@ -4,7 +4,7 @@ function round_difficulty($diff)
{
// only keep 8/9 significant numbers
$sigdigits = 8;
return round($diff, ceil(0 - log10($diff)) + $sigdigits);
return round($diff, (int) ceil(0 - log10($diff)) + $sigdigits);
}
function target_to_diff($target)