This commit is contained in:
Arionum
2018-01-11 15:51:02 +02:00
parent a4b1202f9e
commit 09c2582871

View File

@@ -248,14 +248,15 @@ if($current['height']<$largest_height&&$largest_height>1){
$data=peer_post($url."getBlock",array("height"=>$current['height']));
if($data===false){ _log("Could not get block from $host - $current[height]"); continue; }
while($data['id']!=$current['id']){
$block->delete($current['height']-10);
if($data['id']==$most_common){
if($data['id']!=$current['id']){
$block->delete($current['height']-3);
$current=$block->current();
$data=peer_post($url."getBlock",array("height"=>$current['height']));
if($data===false){_log("Could not get block from $host - $current[height]"); break; }
}
}
if($data['id']!=$current['id']) continue;
while($current['height']<$largest_height){
$data=peer_post($url."getBlocks",array("height"=>$current['height']+1));