Commit af9ca6ec authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/cross_chain' into 'master'

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