hashes tient compte du cache
This commit is contained in:
@@ -27,23 +27,21 @@ $the_block = blockchain::getSpecialBlock($block_hash);
|
||||
if ($the_block === FALSE) die();
|
||||
|
||||
// ---
|
||||
// --- On en recherche 3 sur approximativement 6 heures (36 blocks)
|
||||
// --- On en recherche 6 sur approximativement 6 heures (36 blocks)
|
||||
// ---
|
||||
$max = 3;
|
||||
$max = 6;
|
||||
$max2 = 36;
|
||||
while(($max > 0)&&($max2 > 0))
|
||||
{
|
||||
$block_hash = $the_block->prev_block;
|
||||
|
||||
if (!file_exists(DATA_PATH.'/json/'.$block_hash.'.zip'))
|
||||
{
|
||||
$max--;
|
||||
echo 'CACHE '.$block_hash.' '.($the_block->height-1)." ".$the_block->n_tx.PHP_EOL;
|
||||
}
|
||||
|
||||
$the_block = blockchain::getBlockWithHash($block_hash);
|
||||
if ($the_block === FALSE) die();
|
||||
|
||||
$max--;
|
||||
$max2--;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,14 +27,15 @@ class blockchain
|
||||
'TOPISTO' => '000000000a73e64735a2b75c97ea674950a9018da1420d01328a918c9ff9852c',
|
||||
'PIZZA' => '00000000006de085dadb3ec413ef074022fe781121b467e98960280dd246bb00',
|
||||
'HALVING_1' => '000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e',
|
||||
'WHALE201311' => '0000000000000001bc7156dd1183c87859b326affa3a5cdd157e809537f0b284',
|
||||
'HALVING_2' => '000000000000000002cce816c0ab2c5c269cb081896b7dcb34b8422d6b74ffa1',
|
||||
'BIP_91_LOCK' => '0000000000000000015411ca4b35f7b48ecab015b14de5627b647e262ba0ec40',
|
||||
'BCC' => '00000000000000000019f112ec0a9982926f1258cdcc558dd7c3b7e5dc7fa148',
|
||||
'SEGWIT_LOCK' => '0000000000000000012e6060980c6475a9a8e62a1bf44b76c5d51f707d54522c',
|
||||
'SEGWIT' => '000000000000000000cbeff0b533f8e1189cf09dfbebf57a8ebe349362811b80',
|
||||
'HURRICANE_1' => '0000000000000000000fe6d521a187a5523d5cef6f6c178923ff82ffe5a0f372',
|
||||
'WHALE201810' => '0000000000000000000f9f2dadfb8f312572183272802cbfcc4ff95b4ee6777d',
|
||||
'BLOCK21E800' => '00000000000000000021e800c1e8df51b22c1588e5a624bea17e9faa34b2dc4a'
|
||||
'BLOCK21E800' => '00000000000000000021e800c1e8df51b22c1588e5a624bea17e9faa34b2dc4a',
|
||||
'WHALE201810' => '0000000000000000000f9f2dadfb8f312572183272802cbfcc4ff95b4ee6777d'
|
||||
);
|
||||
|
||||
// ---
|
||||
|
||||
@@ -15,9 +15,17 @@ rm -f $DATA_PATH/block_list.txt
|
||||
|
||||
php cache.php >> $DATA_PATH/block_list.txt
|
||||
|
||||
for BLOCK in GENESIS THE_ANSWER LUCIFER LEET TOPISTO PIZZA HALVING_1 HALVING_2 BIP_91_LOCK BCC SEGWIT_LOCK SEGWIT HURRICANE_1 WHALE201810 BLOCK21E800 LAST
|
||||
LISTBLOCKS="GENESIS THE_ANSWER LUCIFER LEET \
|
||||
TOPISTO PIZZA HALVING_1 WHALE201311 HALVING_2 \
|
||||
BIP_91_LOCK BCC SEGWIT_LOCK SEGWIT \
|
||||
HURRICANE_1 WHALE201810 BLOCK21E800 \
|
||||
LAST"
|
||||
|
||||
for BLOCK in $LISTBLOCKS
|
||||
do
|
||||
php robot.php $BLOCK >> $DATA_PATH/block_list.txt
|
||||
done
|
||||
|
||||
cat $DATA_PATH/block_list.txt
|
||||
|
||||
rm -f $flag
|
||||
|
||||
Reference in New Issue
Block a user