Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
5b938d11
Commit
5b938d11
authored
Sep 18, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
交易步骤调整
parent
9c807aa6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
CrossChainController.php
api/controllers/CrossChainController.php
+3
-3
CrossChainController.php
console/controllers/CrossChainController.php
+9
-4
No files found.
api/controllers/CrossChainController.php
View file @
5b938d11
...
...
@@ -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
;
...
...
console/controllers/CrossChainController.php
View file @
5b938d11
...
...
@@ -93,9 +93,14 @@ class CrossChainController extends Controller
}
//查询共识高度
// $node_params = [
// 'scheme' => 'https',
// 'host' => 'jiedian1.bityuan.com',
// 'port' => 8801
// ];
$node_params
=
[
'scheme'
=>
'http
s
'
,
'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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment