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
29be8f80
Commit
29be8f80
authored
Nov 28, 2018
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rpc request
parent
526392a7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
18 deletions
+22
-18
jrpc_channel_test.go
plugin/dapp/blackwhite/rpc/jrpc_channel_test.go
+1
-1
jrpc_channel_test.go
plugin/dapp/pokerbull/rpc/jrpc_channel_test.go
+3
-2
rpc_channel_test.go
plugin/dapp/privacy/rpc/rpc_channel_test.go
+2
-2
jrpc_channel_test.go
plugin/dapp/relay/rpc/jrpc_channel_test.go
+4
-4
jrpc_channel_test.go
plugin/dapp/retrieve/rpc/jrpc_channel_test.go
+2
-1
jrpc_channel_test.go
plugin/dapp/ticket/rpc/jrpc_channel_test.go
+2
-1
jrpc_channel_test.go
plugin/dapp/trade/rpc/jrpc_channel_test.go
+8
-7
No files found.
plugin/dapp/blackwhite/rpc/jrpc_channel_test.go
View file @
29be8f80
...
...
@@ -87,7 +87,7 @@ func testRoundInfoCmd(t *testing.T, jrpc *jsonclient.JSONClient) error {
var
params
rpctypes
.
Query4Jrpc
req
:=
&
pty
.
ReqBlackwhiteRoundInfo
{}
params
.
FuncName
=
pty
.
GetBlackwhiteRoundInfo
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyBlackwhiteRoundInfo
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
...
...
plugin/dapp/pokerbull/rpc/jrpc_channel_test.go
View file @
29be8f80
...
...
@@ -10,6 +10,7 @@ import (
commonlog
"github.com/33cn/chain33/common/log"
"github.com/33cn/chain33/rpc/jsonclient"
rpctypes
"github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util/testnode"
pty
"github.com/33cn/plugin/plugin/dapp/pokerbull/types"
...
...
@@ -79,7 +80,7 @@ func testQueryGameByID(t *testing.T, jrpc *jsonclient.JSONClient) error {
req
:=
&
pty
.
QueryPBGameInfo
{}
params
.
Execer
=
"pokerbull"
params
.
FuncName
=
"QueryGameByID"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyPBGame
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
...
...
@@ -90,7 +91,7 @@ func testQueryGameByAddr(t *testing.T, jrpc *jsonclient.JSONClient) error {
req
:=
&
pty
.
QueryPBGameInfo
{}
params
.
Execer
=
"pokerbull"
params
.
FuncName
=
"QueryGameByAddr"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
PBGameRecords
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
plugin/dapp/privacy/rpc/rpc_channel_test.go
View file @
29be8f80
...
...
@@ -148,7 +148,7 @@ func testShowAmountsOfUTXO(t *testing.T, jrpc *jsonclient.JSONClient) error {
var
params
rpctypes
.
Query4Jrpc
params
.
Execer
=
pty
.
PrivacyX
params
.
FuncName
=
"ShowAmountsOfUTXO"
params
.
Payload
=
reqPrivacyToken
params
.
Payload
=
types
.
MustPBToJSON
(
&
reqPrivacyToken
)
var
res
pty
.
ReplyPrivacyAmounts
err
:=
jrpc
.
Call
(
"Chain33.Query"
,
params
,
&
res
)
...
...
@@ -163,7 +163,7 @@ func testShowUTXOs4SpecifiedAmount(t *testing.T, jrpc *jsonclient.JSONClient) er
var
params
rpctypes
.
Query4Jrpc
params
.
Execer
=
pty
.
PrivacyX
params
.
FuncName
=
"ShowUTXOs4SpecifiedAmount"
params
.
Payload
=
reqPrivacyToken
params
.
Payload
=
types
.
MustPBToJSON
(
&
reqPrivacyToken
)
var
res
pty
.
ReplyUTXOsOfAmount
err
:=
jrpc
.
Call
(
"Chain33.Query"
,
params
,
&
res
)
...
...
plugin/dapp/relay/rpc/jrpc_channel_test.go
View file @
29be8f80
...
...
@@ -68,7 +68,7 @@ func testShowOnesCreateRelayOrdersCmd(t *testing.T, jrpc *jsonclient.JSONClient)
req
:=
&
pty
.
ReqRelayAddrCoins
{}
params
.
Execer
=
"relay"
params
.
FuncName
=
"GetSellRelayOrder"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyRelayOrders
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
...
...
@@ -79,7 +79,7 @@ func testShowOnesAcceptRelayOrdersCmd(t *testing.T, jrpc *jsonclient.JSONClient)
req
:=
&
pty
.
ReqRelayAddrCoins
{}
params
.
Execer
=
"relay"
params
.
FuncName
=
"GetBuyRelayOrder"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyRelayOrders
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
...
...
@@ -90,7 +90,7 @@ func testShowOnesStatusOrdersCmd(t *testing.T, jrpc *jsonclient.JSONClient) erro
req
:=
&
pty
.
ReqRelayAddrCoins
{}
params
.
Execer
=
"relay"
params
.
FuncName
=
"GetRelayOrderByStatus"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyRelayOrders
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
...
...
@@ -101,7 +101,7 @@ func testShowBTCHeadHeightListCmd(t *testing.T, jrpc *jsonclient.JSONClient) err
req
:=
&
pty
.
ReqRelayBtcHeaderHeightList
{}
params
.
Execer
=
"relay"
params
.
FuncName
=
"GetBTCHeaderList"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyRelayBtcHeadHeightList
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
...
...
plugin/dapp/retrieve/rpc/jrpc_channel_test.go
View file @
29be8f80
...
...
@@ -10,6 +10,7 @@ import (
commonlog
"github.com/33cn/chain33/common/log"
"github.com/33cn/chain33/rpc/jsonclient"
rpctypes
"github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util/testnode"
"github.com/33cn/plugin/plugin/dapp/retrieve/rpc"
...
...
@@ -81,7 +82,7 @@ func testRetrieveQueryCmd(t *testing.T, jrpc *jsonclient.JSONClient) error {
req
:=
&
pty
.
ReqRetrieveInfo
{}
params
.
Execer
=
"retrieve"
params
.
FuncName
=
"GetRetrieveInfo"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
RetrieveQuery
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
plugin/dapp/ticket/rpc/jrpc_channel_test.go
View file @
29be8f80
...
...
@@ -9,6 +9,7 @@ import (
"testing"
"github.com/33cn/chain33/rpc/jsonclient"
rpctypes
"github.com/33cn/chain33/rpc/types"
_
"github.com/33cn/chain33/system"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util/testnode"
...
...
@@ -60,7 +61,7 @@ func testGetColdAddrByMinerCmd(t *testing.T, jrpc *jsonclient.JSONClient) error
req
:=
&
types
.
ReqString
{}
params
.
Execer
=
"ticket"
params
.
FuncName
=
"MinerSourceList"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
types
.
ReplyStrings
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
plugin/dapp/trade/rpc/jrpc_channel_test.go
View file @
29be8f80
...
...
@@ -10,6 +10,7 @@ import (
commonlog
"github.com/33cn/chain33/common/log"
"github.com/33cn/chain33/rpc/jsonclient"
rpctypes
"github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util/testnode"
pty
"github.com/33cn/plugin/plugin/dapp/trade/types"
...
...
@@ -78,7 +79,7 @@ func testShowOnesSellOrdersCmd(t *testing.T, jrpc *jsonclient.JSONClient) error
params
:=
rpctypes
.
Query4Jrpc
{
Execer
:
"trade"
,
FuncName
:
"GetOnesSellOrder"
,
Payload
:
pty
.
ReqAddrAssets
{}
,
Payload
:
types
.
MustPBToJSON
(
&
pty
.
ReqAddrAssets
{})
,
}
var
res
pty
.
ReplySellOrders
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
&
res
)
...
...
@@ -90,7 +91,7 @@ func testShowOnesSellOrdersStatusCmd(t *testing.T, jrpc *jsonclient.JSONClient)
req
:=
&
pty
.
ReqAddrAssets
{}
params
.
Execer
=
"trade"
params
.
FuncName
=
"GetOnesSellOrderWithStatus"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplySellOrders
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
...
...
@@ -101,7 +102,7 @@ func testShowTokenSellOrdersStatusCmd(t *testing.T, jrpc *jsonclient.JSONClient)
req
:=
&
pty
.
ReqTokenSellOrder
{}
params
.
Execer
=
"trade"
params
.
FuncName
=
"GetTokenSellOrderByStatus"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplySellOrders
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
...
...
@@ -113,7 +114,7 @@ func testShowOnesBuyOrderCmd(t *testing.T, jrpc *jsonclient.JSONClient) error {
req
:=
&
pty
.
ReqAddrAssets
{}
params
.
Execer
=
"trade"
params
.
FuncName
=
"GetOnesBuyOrder"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyBuyOrders
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
...
...
@@ -125,7 +126,7 @@ func testShowOnesBuyOrdersStatusCmd(t *testing.T, jrpc *jsonclient.JSONClient) e
req
:=
&
pty
.
ReqAddrAssets
{}
params
.
Execer
=
"trade"
params
.
FuncName
=
"GetOnesBuyOrderWithStatus"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyBuyOrders
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
...
...
@@ -137,7 +138,7 @@ func testShowTokenBuyOrdersStatusCmd(t *testing.T, jrpc *jsonclient.JSONClient)
req
:=
&
pty
.
ReqTokenBuyOrder
{}
params
.
Execer
=
"trade"
params
.
FuncName
=
"GetTokenBuyOrderByStatus"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyBuyOrders
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
...
...
@@ -149,7 +150,7 @@ func testShowOnesOrdersStatusCmd(t *testing.T, jrpc *jsonclient.JSONClient) erro
req
:=
&
pty
.
ReqAddrAssets
{}
params
.
Execer
=
"trade"
params
.
FuncName
=
"GetOnesOrderWithStatus"
params
.
Payload
=
req
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyTradeOrders
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
...
...
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