Commit 581bbe15 authored by shajiaiming's avatar shajiaiming

fix

parent 51257a22
...@@ -91,11 +91,17 @@ class GameBetController extends Controller ...@@ -91,11 +91,17 @@ class GameBetController extends Controller
echo date('Y-m-d H:i:s') . '无节点' . PHP_EOL; echo date('Y-m-d H:i:s') . '无节点' . PHP_EOL;
return 0; return 0;
} }
foreach ($nodes as $key => $node) { foreach ($nodes as $key => $node) {
$service = new Chain33Service($node); $service = new Chain33Service($node);
$result = $service->getLastHeader(); $result = $service->getLastHeader();
$height = $result['result']['height']; $height = $result['result']['height'];
$main_info = $service->getBlock2MainInfo($height - 36, $height); $param = [
'start' => $height - 36,
'end' => $height,
'isDetail' => false
];
$main_info = $service->chainQuery('paracross', 'GetBlock2MainInfo', $param);
if (!isset($main_info['result']['items'])) continue; if (!isset($main_info['result']['items'])) continue;
$items = $main_info['result']['items']; $items = $main_info['result']['items'];
$items = $this->arraySort($items, 'mainHeight'); $items = $this->arraySort($items, 'mainHeight');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment