block list en JSON
This commit is contained in:
@@ -74,7 +74,7 @@ class blockchain
|
||||
//
|
||||
// Init special blocks array ...
|
||||
//
|
||||
public static function init()
|
||||
public static function init_v1()
|
||||
{
|
||||
self::$special_blocks = array ();
|
||||
|
||||
@@ -272,8 +272,8 @@ class blockchain
|
||||
);
|
||||
|
||||
self::$special_blocks[] = new block(
|
||||
'00000000006de085dadb3ec413ef074022fe781121b467e98960280dd246bb00',
|
||||
57035,
|
||||
'00000000152340ca42227603908689183edc47355204e7aca59383b0aaac1fd8',
|
||||
57043,
|
||||
'PIZZA'
|
||||
);
|
||||
|
||||
@@ -331,6 +331,16 @@ class blockchain
|
||||
'GENESIS'
|
||||
);
|
||||
}
|
||||
public static function init_v2()
|
||||
{
|
||||
$path = APP_PATH.'/blockchain/data/blocks.json';
|
||||
$jsonString = file_get_contents($path);
|
||||
self::$special_blocks = json_decode($jsonString, true);
|
||||
}
|
||||
public static function init(){
|
||||
self::init_v2();
|
||||
}
|
||||
|
||||
|
||||
// ---
|
||||
// --- Retourne le JSON du tableau des blocs speciaux
|
||||
|
||||
Reference in New Issue
Block a user