Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
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
plugin
Commits
7c608d46
Commit
7c608d46
authored
Jun 11, 2020
by
QM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tesh.sh
parent
7b570ee2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
docker-compose-down.sh
build/docker-compose-down.sh
+6
-0
ethinterface.go
...in/dapp/x2ethereum/ebrelayer/ethinterface/ethinterface.go
+10
-0
ethtxs_test.go
plugin/dapp/x2ethereum/ebrelayer/ethtxs/ethtxs_test.go
+3
-3
No files found.
build/docker-compose-down.sh
View file @
7c608d46
...
...
@@ -42,6 +42,12 @@ function down() {
docker-compose down
--rmi
local
fi
# shellcheck disable=SC2155
local
isGanacheExit
=
$(
docker ps |
grep
ganachetest
)
if
[[
${
isGanacheExit
}
!=
""
]]
;
then
docker stop ganachetest
docker
rm
ganachetest
fi
}
# run script
...
...
plugin/dapp/x2ethereum/ebrelayer/ethinterface/ethinterface.go
View file @
7c608d46
...
...
@@ -2,6 +2,7 @@ package ethinterface
import
(
"context"
"errors"
"math/big"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
...
...
@@ -24,3 +25,12 @@ type SimExtend struct {
func
(
sim
*
SimExtend
)
HeaderByNumber
(
ctx
context
.
Context
,
number
*
big
.
Int
)
(
*
types
.
Header
,
error
)
{
return
sim
.
Blockchain
()
.
CurrentBlock
()
.
Header
(),
nil
}
func
(
sim
*
SimExtend
)
TransactionReceipt
(
ctx
context
.
Context
,
txHash
common
.
Hash
)
(
*
types
.
Receipt
,
error
)
{
receipt
,
err
:=
sim
.
SimulatedBackend
.
TransactionReceipt
(
ctx
,
txHash
)
if
receipt
==
nil
{
err
=
errors
.
New
(
"not found"
)
}
return
receipt
,
err
}
plugin/dapp/x2ethereum/ebrelayer/ethtxs/ethtxs_test.go
View file @
7c608d46
...
...
@@ -84,9 +84,9 @@ func Test_RelayOracleClaimToEthereum(t *testing.T) {
require
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
txhash
,
"0x6fa087c7a2a8a4421f6e269fbc6c0838e99fa59d5760155a71cd7eb1c01aafad"
)
//
hash := "0xc0c22aa6198fdde0dbe47ddadbe449f736b82ed4a498871de5d5f4ad9ae122a0"
//
status := GetEthTxStatus(sim, common.HexToHash(hash))
//fmt.Println(status
)
hash
:=
"0xc0c22aa6198fdde0dbe47ddadbe449f736b82ed4a498871de5d5f4ad9ae122a0"
status
:=
GetEthTxStatus
(
sim
,
common
.
HexToHash
(
hash
))
assert
.
Equal
(
t
,
status
,
EthTxPending
.
String
()
)
_
,
err
=
revokeNonce
(
para
.
Operator
)
require
.
Nil
(
t
,
err
)
...
...
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