Commit 441d81f2 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/optimize' into 'master'

Feature/optimize See merge request !304
parents 8ad9e715 66832760
...@@ -231,7 +231,11 @@ class Chain33Service ...@@ -231,7 +231,11 @@ class Chain33Service
$params = [ $params = [
'data' => $data 'data' => $data
]; ];
return $this->send($params, 'Chain33.SendTransaction'); $timeout = [
'connect_timeout' => 50000,
'timeout_ms' => 50000
];
return $this->send($params, 'Chain33.SendTransaction', $timeout);
} }
public function QueryTransaction($data) public function QueryTransaction($data)
...@@ -419,6 +423,16 @@ class Chain33Service ...@@ -419,6 +423,16 @@ class Chain33Service
return $this->send($params, 'Chain33.Query'); return $this->send($params, 'Chain33.Query');
} }
public function chainQuery($execer, $funcName, $param)
{
$params = [
'execer' => $execer,
'funcName' => $funcName,
'payload' => $param
];
return $this->send($params, 'Chain33.Query');
}
/** /**
* @param array $hashes * @param array $hashes
* @return array * @return array
......
...@@ -162,11 +162,16 @@ class OrderController extends Controller ...@@ -162,11 +162,16 @@ class OrderController extends Controller
//3步交易情况下需要做高度判断,2步交易注释IF判断 //3步交易情况下需要做高度判断,2步交易注释IF判断
if (CoinCTocTransfer::CONSENSUE_YES == $val['consensus'] && true == $switch && isset($height)) { if (CoinCTocTransfer::CONSENSUE_YES == $val['consensus'] && true == $switch && isset($height)) {
$service = new Chain33Service($node); $service = new Chain33Service($node);
$result = $service->getHeight($val['consensus_platform']); $execer = 'paracross';
$func_name = 'GetTitle';
$playload = [
'data' => 'user.p.'.$val['consensus_platform'] . '.'
];
$result = $service->chainQuery($execer, $func_name, $playload);
if (!isset($result['result'])) { if (!isset($result['result'])) {
continue; continue;
} }
$consensHeight = $result['result']['consensHeight']; $consensHeight = $result['result']['height'];
if ($consensHeight < $height) { if ($consensHeight < $height) {
continue; continue;
} }
......
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