sanity
This commit is contained in:
@@ -248,14 +248,15 @@ if($current['height']<$largest_height&&$largest_height>1){
|
|||||||
$data=peer_post($url."getBlock",array("height"=>$current['height']));
|
$data=peer_post($url."getBlock",array("height"=>$current['height']));
|
||||||
|
|
||||||
if($data===false){ _log("Could not get block from $host - $current[height]"); continue; }
|
if($data===false){ _log("Could not get block from $host - $current[height]"); continue; }
|
||||||
|
if($data['id']==$most_common){
|
||||||
while($data['id']!=$current['id']){
|
if($data['id']!=$current['id']){
|
||||||
$block->delete($current['height']-10);
|
$block->delete($current['height']-3);
|
||||||
$current=$block->current();
|
$current=$block->current();
|
||||||
$data=peer_post($url."getBlock",array("height"=>$current['height']));
|
$data=peer_post($url."getBlock",array("height"=>$current['height']));
|
||||||
|
|
||||||
if($data===false){_log("Could not get block from $host - $current[height]"); break; }
|
if($data===false){_log("Could not get block from $host - $current[height]"); break; }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if($data['id']!=$current['id']) continue;
|
if($data['id']!=$current['id']) continue;
|
||||||
while($current['height']<$largest_height){
|
while($current['height']<$largest_height){
|
||||||
$data=peer_post($url."getBlocks",array("height"=>$current['height']+1));
|
$data=peer_post($url."getBlocks",array("height"=>$current['height']+1));
|
||||||
|
|||||||
Reference in New Issue
Block a user