Commit 5b938d11 authored by shajiaiming's avatar shajiaiming

交易步骤调整

parent 9c807aa6
......@@ -21,7 +21,7 @@ class CrossChainController extends BaseController
goto doEnd;
}
$post = $request->post();
if (3 != count($post['txs'])) {
if (2 != count($post['txs'])) {
$msg = '交易笔数错误!';
goto doEnd;
}
......@@ -179,8 +179,8 @@ class CrossChainController extends BaseController
}
//交易成功,查询成功
if (true == $val['send_result'] && 'success' == $val['query_result'] && 'success' == $val['msg']) {
if (2 == $key) {
$step = (2 == $key) ? 4 : ($key + 2);
if (1 == $key) {
$step = (1 == $key) ? 3 : ($key + 1);
$code = 0;
$msg = $val['send_result'];
goto doEnd;
......
......@@ -93,9 +93,14 @@ class CrossChainController extends Controller
}
//查询共识高度
// $node_params = [
// 'scheme' => 'https',
// 'host' => 'jiedian1.bityuan.com',
// 'port' => 8801
// ];
$node_params = [
'scheme' => 'https',
'host' => 'jiedian1.bityuan.com',
'scheme' => 'http',
'host' => '172.16.100.74',
'port' => 8801
];
$service = new Chain33Service($node_params);
......@@ -157,7 +162,7 @@ class CrossChainController extends Controller
doEnd :
if (CoinCrossChain::RECHARGE == $val['is_with_draw'] && $val['step'] == 2 && $switch && isset($height) && ($consensHeight < $height)) {
if (CoinCrossChain::RECHARGE == $val['is_with_draw'] && $val['step'] == 1 && $switch && isset($height) && ($consensHeight < $height)) {
continue;
}
......@@ -167,7 +172,7 @@ class CrossChainController extends Controller
$currentModel->save();
$count = CoinCrossChain::find()->where(['transfer_number' => $val['transfer_number']])->andWhere(['query_result' => 'success'])->count();
if (3 == $count) {
if (2 == $count) {
$key = $val['address'] . '_' . $val['is_with_draw'];
if ($redis->exists($key)) {
$redis->del($key);
......
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