From ebf5b0d6488009455e4e739e92829292b60c5396 Mon Sep 17 00:00:00 2001 From: MEUNIER Thibaud Date: Tue, 25 Sep 2018 20:43:18 +0200 Subject: [PATCH] =?UTF-8?q?R=C3=A9duire=20la=20dur=C3=A9e=20du=20TWEET=20e?= =?UTF-8?q?t=20ajouter=20le=20nbre=20de=20transactions=20dans=20le=20fichi?= =?UTF-8?q?er=20block=5Fliste.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blockchain/cache.php | 2 +- blockchain/robot.php | 2 +- scripts/blocks.sh | 5 +++++ scripts/tweet.sh | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/blockchain/cache.php b/blockchain/cache.php index 7df5503..8e97930 100644 --- a/blockchain/cache.php +++ b/blockchain/cache.php @@ -38,7 +38,7 @@ while(($max > 0)&&($max2 > 0)) if (!file_exists(DATA_PATH.'/json/'.$block_hash.'.zip')) { $max--; - echo 'CACHE '.$block_hash.' '.($the_block->height-1).PHP_EOL; + echo 'CACHE '.$block_hash.' '.($the_block->height-1)." ".$the_block->n_tx.PHP_EOL; } $the_block = blockchain::getBlockWithHash($block_hash); diff --git a/blockchain/robot.php b/blockchain/robot.php index addef35..26fa8b7 100644 --- a/blockchain/robot.php +++ b/blockchain/robot.php @@ -47,6 +47,6 @@ if ($block_hash == 'LAST') } } -echo $the_block->hash." ".$the_block->height.PHP_EOL; +echo $the_block->hash." ".$the_block->height." ".$the_block->n_tx.PHP_EOL; ?> diff --git a/scripts/blocks.sh b/scripts/blocks.sh index aaf4cfa..7dbc0d8 100755 --- a/scripts/blocks.sh +++ b/scripts/blocks.sh @@ -100,6 +100,11 @@ then if [ "$BNAME" != "LAST" ] then touch -t $DATE $DATA_PATH/$ROBOT/$BLOCK.png + if [ -f $DATA_PATH/spline/$BLOCK.png ] + then + rm -f $DATA_PATH/hasard/$BLOCK.png + ln $DATA_PATH/spline/$BLOCK.png $DATA_PATH/hasard/$BLOCK.png + fi fi # diff --git a/scripts/tweet.sh b/scripts/tweet.sh index 5529ee9..93ad022 100755 --- a/scripts/tweet.sh +++ b/scripts/tweet.sh @@ -56,7 +56,7 @@ fi # # TWEET # -TWEET=3 +TWEET=30 if [ $((MINUTE % $TWEET)) -eq 0 ] then debug "send a TWEET"