Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sidecar-client-chain33
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
Registry
Registry
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-client-chain33
Commits
b8780cef
Commit
b8780cef
authored
Aug 08, 2022
by
suyanlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix paracross exec address bug
parent
5d8d0160
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
evmxgo.go
evmxgo/evmxgo.go
+3
-1
evmxgo.toml
evmxgo/evmxgo.toml
+1
-1
paracross.go
paracross/paracross.go
+4
-2
No files found.
evmxgo/evmxgo.go
View file @
b8780cef
...
...
@@ -9,6 +9,8 @@ import (
"strings"
"time"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/common/db"
types33
"github.com/33cn/chain33/types"
...
...
@@ -565,7 +567,7 @@ func (e *Evmxgo) SubmitIBTP(ibtp *pb.IBTP) (*pb.SubmitIBTPResponse, error) {
tx
.
Nonce
=
int64
(
ibtp
.
Nonce
)
res
,
err
:=
e
.
client
.
SendTransactionSync
(
e
.
pk
,
tx
)
// TODO why use async?
if
err
!=
nil
{
e
.
logger
.
Error
(
"e.client.SendTransactionSync(e.pk,tx)"
,
"error"
,
err
)
e
.
logger
.
Error
(
"e.client.SendTransactionSync(e.pk,tx)"
,
"
hash"
,
common
.
HashHex
(
tx
.
Hash
()),
"
error"
,
err
)
return
nil
,
err
}
ibtpRes
:=
&
pb
.
SubmitIBTPResponse
{}
...
...
evmxgo/evmxgo.toml
View file @
b8780cef
...
...
@@ -12,7 +12,7 @@ fee = 100000
#被监听链ID
chain_id
=
0
step
=
10
symbol
=
"
bty
"
symbol
=
"
BTY
"
[log]
#日志级别
...
...
paracross/paracross.go
View file @
b8780cef
...
...
@@ -17,6 +17,7 @@ import (
"github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/rpc/grpcclient"
_
"github.com/33cn/chain33/system/address"
types33
"github.com/33cn/chain33/types"
util33
"github.com/33cn/chain33/util"
"github.com/33cn/plugin/plugin/dapp/paracross/executor"
...
...
@@ -169,6 +170,7 @@ func (p *Paracross) Initialize(configPath string, ID string, extra []byte) error
}
else
{
p
.
execAddress
=
address
.
ExecAddress
(
ID
)
}
p
.
logger
.
Info
(
"print execAddress"
,
"execAddress"
,
p
.
execAddress
)
config33
=
fmt
.
Sprintf
(
config33
,
p
.
title
,
chain33Config
.
Chain33
.
Addr
)
p
.
logger
.
Info
(
config33
)
...
...
@@ -729,7 +731,7 @@ func (p *Paracross) SubmitIBTP(ibtp *pb.IBTP) (*pb.SubmitIBTPResponse, error) {
tx
.
Sign
(
types33
.
SECP256K1
,
p
.
privateKey
)
ret
,
err
:=
p
.
grpcClient
.
SendTransaction
(
p
.
ctx
,
tx
)
if
err
!=
nil
{
p
.
logger
.
Error
(
"SendTransaction "
,
"error"
,
err
)
p
.
logger
.
Error
(
"SendTransaction "
,
"
hash"
,
common
.
HashHex
(
tx
.
Hash
()),
"
error"
,
err
)
return
nil
,
err
}
ibtpRes
.
Result
=
ibtp
...
...
@@ -739,7 +741,7 @@ func (p *Paracross) SubmitIBTP(ibtp *pb.IBTP) (*pb.SubmitIBTPResponse, error) {
ibtpRes
.
Status
=
true
}
else
{
ibtpRes
.
Status
=
false
p
.
logger
.
Error
(
"SendTransaction error"
,
"msg"
,
string
(
ret
.
Msg
))
p
.
logger
.
Error
(
"SendTransaction error"
,
"
hash"
,
common
.
HashHex
(
tx
.
Hash
()),
"
msg"
,
string
(
ret
.
Msg
))
}
return
ibtpRes
,
nil
}
...
...
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