Commit df038b70 authored by shajiaiming's avatar shajiaiming

优化

parent 25569505
...@@ -35,13 +35,15 @@ class CrossChainController extends Controller ...@@ -35,13 +35,15 @@ class CrossChainController extends Controller
//go(function () use ($val) { //go(function () use ($val) {
// \Co::sleep(0.5); // \Co::sleep(0.5);
$node_params = $val['transfer_url']; $transfer_url = $val['transfer_url'];
$node_params = explode(':', $node_params); $transfer_url = explode(':', $transfer_url);
$node_params = [ $node_params = [
'scheme' => $node_params[0], 'scheme' => $transfer_url[0],
'host' => str_replace('//', '', $node_params[1]), 'host' => str_replace('//', '', $transfer_url[1]),
'port' => $node_params[2] 'port' => isset($transfer_url[2]) ? $transfer_url[2] : ''
]; ];
$service = new Chain33Service($node_params); $service = new Chain33Service($node_params);
$sign_str = $val['txhex']; $sign_str = $val['txhex'];
$result = $service->sendTransaction($sign_str); $result = $service->sendTransaction($sign_str);
...@@ -83,7 +85,7 @@ class CrossChainController extends Controller ...@@ -83,7 +85,7 @@ class CrossChainController extends Controller
$node_params = [ $node_params = [
'scheme' => $node_params[0], 'scheme' => $node_params[0],
'host' => str_replace('//', '', $node_params[1]), 'host' => str_replace('//', '', $node_params[1]),
'port' => $node_params[2] 'port' => isset($node_params[2]) ? $node_params[2] : ''
]; ];
$service = new Chain33Service($node_params); $service = new Chain33Service($node_params);
$send_result = $val['send_result']; $send_result = $val['send_result'];
......
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