Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sidecar
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
link33
sidecar
Commits
39b68945
Commit
39b68945
authored
Nov 04, 2021
by
suyanlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
馃悰
fix send ibtp transaction bug
parent
02c8d076
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
appchain.go
internal/appchain/appchain.go
+1
-1
port.go
internal/appchain/port.go
+13
-2
No files found.
internal/appchain/appchain.go
View file @
39b68945
...
...
@@ -40,7 +40,7 @@ func NewPort(client plugins.Client, cryptor txcrypto.Cryptor, logger logrus.Fiel
client
:
client
,
cryptor
:
cryptor
,
logger
:
logger
,
recvCh
:
make
(
chan
*
pb
.
IBTP
,
1024
),
recvCh
:
make
(
chan
*
pb
.
IBTP
,
port
.
MaxCapacity
),
ctx
:
ctx
,
cancel
:
cancel
,
msgCh
:
make
(
chan
*
pb
.
Message
,
port
.
Capacity
),
...
...
internal/appchain/port.go
View file @
39b68945
...
...
@@ -47,7 +47,6 @@ func (a *appChain) Send(msg *pb.Message) (*pb.Message, error) {
return
nil
,
errors
.
New
(
"ibtp wrong"
)
}
if
ibtp
.
Type
==
pb
.
IBTP_RECEIPT_FAILURE
||
pb
.
IBTP_RECEIPT_SUCCESS
==
ibtp
.
Type
{
//
//TODO 榛樿璺敱
ix
:=
pb
.
IBTPX
{
Ibtp
:
ibtp
,
...
...
@@ -87,7 +86,19 @@ func (a *appChain) ListenIBTPX() <-chan *pb.Message {
select
{
case
ibtp
:=
<-
ibtpCh
:
// TODO ibtp to ibtpx
data
,
_
:=
ibtp
.
Marshal
()
// TODO 榛樿璺敱
ix
:=
pb
.
IBTPX
{
Ibtp
:
ibtp
,
Mode
:
repo
.
DirectMode
,
RouteSign
:
[]
string
{},
RouteMethod
:
router
.
Single
,
RouteMethodArg
:
[]
string
{},
IsValid
:
false
,
// TODO
}
data
,
err
:=
ix
.
Marshal
()
if
err
!=
nil
{
a
.
logger
.
Error
(
"appchain ListenIBTPX Err: "
,
err
)
}
msg
:=
pb
.
Msg
(
pb
.
Message_IBTP_SEND
,
true
,
data
)
a
.
msgCh
<-
msg
case
<-
a
.
ctx
.
Done
()
:
...
...
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