Commit f74891c9 authored by shajiaiming's avatar shajiaiming

区间高度

parent 3e0891da
...@@ -85,7 +85,7 @@ class GameBetController extends Controller ...@@ -85,7 +85,7 @@ class GameBetController extends Controller
]; ];
$result = $service->getLastHeader($node_params); $result = $service->getLastHeader($node_params);
$main_height = isset($result['result']['height']) ? $result['result']['height'] : 0; $main_height = isset($result['result']['height']) ? $result['result']['height'] : 0;
$safe_main_height = $main_height - 14; $safe_main_height = $main_height - 36;
$nodes = \Yii::$app->params['chain_parallel']['wasm']; $nodes = \Yii::$app->params['chain_parallel']['wasm'];
if (empty($nodes)) { if (empty($nodes)) {
echo date('Y-m-d H:i:s') . '无节点' . PHP_EOL; echo date('Y-m-d H:i:s') . '无节点' . PHP_EOL;
...@@ -95,7 +95,7 @@ class GameBetController extends Controller ...@@ -95,7 +95,7 @@ class GameBetController extends Controller
$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 - 14, $height); $main_info = $service->getBlock2MainInfo($height - 36, $height);
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