diff --git a/public/js/filters.js b/public/js/filters.js index 0ea847dc8..f0ecdbd20 100644 --- a/public/js/filters.js +++ b/public/js/filters.js @@ -26,10 +26,26 @@ var getDifficulty = function(hashes) { unit = 'G'; } - if(hashes >= Math.pow(1000, 4) ) { + if(hashes >= Math.pow(1000, 4) && hashes < Math.pow(1000, 5)) { result = hashes / Math.pow(1000, 4); unit = 'T'; } + + if(hashes >= Math.pow(1000, 5) && hashes < Math.pow(1000, 6)) { + result = hashes / Math.pow(1000, 5); + unit = 'P'; + } + + if(hashes >= Math.pow(1000, 6) && hashes < Math.pow(1000, 7)) { + result = hashes / Math.pow(1000, 6); + unit = 'E'; + } + + if(hashes >= Math.pow(1000, 7) ) { + result = hashes / Math.pow(1000, 7); + unit = 'Z'; + } + return result.toFixed(2) + ' ' + unit + 'H'; } @@ -63,4 +79,4 @@ var getDuration = function(timestamp){ }).join(', '); }; return dur; -}; \ No newline at end of file +}; diff --git a/public/views/block.html b/public/views/block.html index 51fd379f6..5f808091b 100644 --- a/public/views/block.html +++ b/public/views/block.html @@ -13,7 +13,7 @@