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
689edd63
Unverified
Commit
689edd63
authored
Jun 30, 2020
by
pengjun
Committed by
GitHub
Jun 30, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4 from jpeng-go/revert-2-fix-dpos-test-para2
Revert "Fix dpos test para2"
parents
9e57e88c
230d104f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
8 deletions
+2
-8
dapp-test-rpc.sh
build/dapp-test-rpc.sh
+1
-1
node_test.go
plugin/consensus/dpos/node_test.go
+1
-2
para_test.go
plugin/dapp/paracross/testnode/para_test.go
+0
-2
paranode.go
plugin/dapp/paracross/testnode/paranode.go
+0
-3
No files found.
build/dapp-test-rpc.sh
View file @
689edd63
...
@@ -16,7 +16,7 @@ function dapp_test_rpc() {
...
@@ -16,7 +16,7 @@ function dapp_test_rpc() {
dapps
=
$(
find
.
-maxdepth
1
-type
d
!
-name
dapptest
!
-name
.
|
sed
's/^\.\///'
|
sort
)
dapps
=
$(
find
.
-maxdepth
1
-type
d
!
-name
dapptest
!
-name
.
|
sed
's/^\.\///'
|
sort
)
echo
"dapps list:
$dapps
"
echo
"dapps list:
$dapps
"
set
+e
set
+e
parallel
-k
--
jobs
30
--
results
outdir
--joblog
./jobs.log ./
{}
/
"
${
RPC_TESTFILE
}
"
"
$ip
"
:::
"
$dapps
"
parallel
-k
--results
outdir
--joblog
./jobs.log ./
{}
/
"
${
RPC_TESTFILE
}
"
"
$ip
"
:::
"
$dapps
"
local
ret
=
$?
local
ret
=
$?
if
[
$ret
-ne
0
]
;
then
if
[
$ret
-ne
0
]
;
then
wrongdapps
=
$(
awk
'{print $7,$9 }'
jobs.log |
grep
-a
1 |
awk
-F
'/'
'{print $2}'
)
wrongdapps
=
$(
awk
'{print $7,$9 }'
jobs.log |
grep
-a
1 |
awk
-F
'/'
'{print $2}'
)
...
...
plugin/consensus/dpos/node_test.go
View file @
689edd63
...
@@ -559,8 +559,6 @@ func initEnvDpos1(configName string) (queue.Queue, *blockchain.BlockChain, queue
...
@@ -559,8 +559,6 @@ func initEnvDpos1(configName string) (queue.Queue, *blockchain.BlockChain, queue
q
.
SetConfig
(
chain33Cfg
)
q
.
SetConfig
(
chain33Cfg
)
cfg
:=
chain33Cfg
.
GetModuleConfig
()
cfg
:=
chain33Cfg
.
GetModuleConfig
()
sub
:=
chain33Cfg
.
GetSubConfig
()
sub
:=
chain33Cfg
.
GetSubConfig
()
rpc
.
InitCfg
(
cfg
.
RPC
)
chain
:=
blockchain
.
New
(
chain33Cfg
)
chain
:=
blockchain
.
New
(
chain33Cfg
)
chain
.
SetQueueClient
(
q
.
Client
())
chain
.
SetQueueClient
(
q
.
Client
())
...
@@ -580,6 +578,7 @@ func initEnvDpos1(configName string) (queue.Queue, *blockchain.BlockChain, queue
...
@@ -580,6 +578,7 @@ func initEnvDpos1(configName string) (queue.Queue, *blockchain.BlockChain, queue
network
.
SetQueueClient
(
q
.
Client
())
network
.
SetQueueClient
(
q
.
Client
())
rpc
.
InitCfg
(
cfg
.
RPC
)
gapi
:=
rpc
.
NewGRpcServer
(
q
.
Client
(),
nil
)
gapi
:=
rpc
.
NewGRpcServer
(
q
.
Client
(),
nil
)
go
gapi
.
Listen
()
go
gapi
.
Listen
()
...
...
plugin/dapp/paracross/testnode/para_test.go
View file @
689edd63
...
@@ -18,11 +18,9 @@ func TestParaNode(t *testing.T) {
...
@@ -18,11 +18,9 @@ func TestParaNode(t *testing.T) {
defer
para
.
Close
()
defer
para
.
Close
()
//通过rpc 发生信息
//通过rpc 发生信息
tx
:=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.test.none"
)
tx
:=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.test.none"
)
assert
.
NotNil
(
t
,
tx
)
para
.
Para
.
SendTxRPC
(
tx
)
para
.
Para
.
SendTxRPC
(
tx
)
para
.
Para
.
WaitHeight
(
1
)
para
.
Para
.
WaitHeight
(
1
)
tx
=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.test.none"
)
tx
=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.test.none"
)
assert
.
NotNil
(
t
,
tx
)
para
.
Para
.
SendTxRPC
(
tx
)
para
.
Para
.
SendTxRPC
(
tx
)
para
.
Para
.
WaitHeight
(
2
)
para
.
Para
.
WaitHeight
(
2
)
...
...
plugin/dapp/paracross/testnode/paranode.go
View file @
689edd63
package
testnode
package
testnode
import
(
import
(
"fmt"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util/testnode"
"github.com/33cn/chain33/util/testnode"
)
)
...
@@ -26,7 +24,6 @@ func NewParaNode(main *testnode.Chain33Mock, para *testnode.Chain33Mock) *ParaNo
...
@@ -26,7 +24,6 @@ func NewParaNode(main *testnode.Chain33Mock, para *testnode.Chain33Mock) *ParaNo
}
}
if
para
==
nil
{
if
para
==
nil
{
cfg
:=
types
.
NewChain33Config
(
DefaultConfig
)
cfg
:=
types
.
NewChain33Config
(
DefaultConfig
)
fmt
.
Println
(
"mainnode.Grpc="
,
main
.
GetCfg
()
.
RPC
.
GrpcBindAddr
,
"mainnode.jrpc="
,
main
.
GetCfg
()
.
RPC
.
JrpcBindAddr
)
testnode
.
ModifyParaClient
(
cfg
,
main
.
GetCfg
()
.
RPC
.
GrpcBindAddr
)
testnode
.
ModifyParaClient
(
cfg
,
main
.
GetCfg
()
.
RPC
.
GrpcBindAddr
)
para
=
testnode
.
NewWithConfig
(
cfg
,
nil
)
para
=
testnode
.
NewWithConfig
(
cfg
,
nil
)
para
.
Listen
()
para
.
Listen
()
...
...
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