ajout de explorer.php

This commit is contained in:
2018-10-21 08:17:07 +02:00
parent 5490ea5377
commit b21e660971
6 changed files with 171 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
// Init array
var liste_blocks = {
'21E8' : '00000000000000000021e800c1e8df51b22c1588e5a624bea17e9faa34b2dc4a',
'WHALE201810' : '0000000000000000000f9f2dadfb8f312572183272802cbfcc4ff95b4ee6777d',
'BLOCK21E800' : '00000000000000000021e800c1e8df51b22c1588e5a624bea17e9faa34b2dc4a',
'HURRICANE_1' : '0000000000000000000fe6d521a187a5523d5cef6f6c178923ff82ffe5a0f372',
'SEGWIT' : '000000000000000000cbeff0b533f8e1189cf09dfbebf57a8ebe349362811b80',
'SEGWIT_LOCK' : '0000000000000000012e6060980c6475a9a8e62a1bf44b76c5d51f707d54522c',
@@ -180,6 +181,23 @@
return true;
}
function ajouterPreviousBlock()
{
// Bloquer la navigation pendant le calcul
if (!flag_nav) return false;
flag_nav = false;
// Ajouter un div
addDivForBlock(cur_height[cur_height.length-1] - 1);
// Mettre les infos du
block_hash = '?block_hash='+liste_blocks['PREVIOUS'];
$.getJSON('data/getBlockInfo.php'+block_hash, function( data ) {
liste_blocks['PREVIOUS'] = data.prev;
liste_blocks['BLOCK_'+data.height] = data.hash;
addInfoForBlock(data);
});
}
function initBlockchain(block_name)
{
$(document).scrollTop( $("#explorer").offset().top );