|
|
@ -259,6 +259,14 @@ class blockchain |
|
|
{
|
|
|
{
|
|
|
if (file_exists(DATA_PATH.'/json/'.$the_block->hash.'.zip')) return $the_block;
|
|
|
if (file_exists(DATA_PATH.'/json/'.$the_block->hash.'.zip')) return $the_block;
|
|
|
|
|
|
|
|
|
|
|
|
// Blockchain.info renvoie des nonces négatifs
|
|
|
|
|
|
// Je repasse par la forme binaire pour retrouver
|
|
|
|
|
|
// une valeur positive
|
|
|
|
|
|
$the_block->nonce_binary_str = decbin($the_block->nonce);
|
|
|
|
|
|
if (strlen($the_block->nonce_binary_str) > 32) $the_block->nonce_binray_str = substr($nonce_binray_str,-32,32);
|
|
|
|
|
|
$the_block->topisto_nonce_blockchain_info = $the_block->nonce;
|
|
|
|
|
|
$the_block->nonce = bindec($the_block->nonce_binray_str);
|
|
|
|
|
|
|
|
|
if (!isset($the_block->topisto_inputs))
|
|
|
if (!isset($the_block->topisto_inputs))
|
|
|
{
|
|
|
{
|
|
|
$the_block->topisto_inputs = 0;
|
|
|
$the_block->topisto_inputs = 0;
|
|
|
|