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
c40dba14
Commit
c40dba14
authored
Dec 14, 2018
by
pengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pokerbull由统一接口创建交易
parent
b4efbed2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
229 deletions
+75
-229
game.go
plugin/dapp/pokerbull/commands/game.go
+15
-23
plugin.go
plugin/dapp/pokerbull/plugin.go
+0
-2
pokerbull.proto
plugin/dapp/pokerbull/proto/pokerbull.proto
+0
-11
jrpc.go
plugin/dapp/pokerbull/rpc/jrpc.go
+0
-84
jrpc_channel_test.go
plugin/dapp/pokerbull/rpc/jrpc_channel_test.go
+60
-10
rpc.go
plugin/dapp/pokerbull/rpc/rpc.go
+0
-69
types.go
plugin/dapp/pokerbull/rpc/types.go
+0
-30
pokerbull.pb.go
plugin/dapp/pokerbull/types/pokerbull.pb.go
+0
-0
No files found.
plugin/dapp/pokerbull/commands/game.go
View file @
c40dba14
...
@@ -56,19 +56,15 @@ func pokerbullStart(cmd *cobra.Command, args []string) {
...
@@ -56,19 +56,15 @@ func pokerbullStart(cmd *cobra.Command, args []string) {
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
value
,
_
:=
cmd
.
Flags
()
.
GetUint64
(
"value"
)
value
,
_
:=
cmd
.
Flags
()
.
GetUint64
(
"value"
)
playerCount
,
_
:=
cmd
.
Flags
()
.
GetUint32
(
"playerCount"
)
playerCount
,
_
:=
cmd
.
Flags
()
.
GetUint32
(
"playerCount"
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
feeInt64
:=
int64
(
fee
*
1e4
)
params
:=
&
rpctypes
.
CreateTxIn
{
amountInt64
:=
int64
(
value
)
Execer
:
types
.
ExecName
(
pkt
.
PokerBullX
),
ActionName
:
pkt
.
CreateStartTx
,
params
:=
&
pkt
.
PBStartTxReq
{
Payload
:
[]
byte
(
fmt
.
Sprintf
(
"{
\"
value
\"
:%d,
\"
playerNum
\"
:%d}"
,
int64
(
value
)
*
types
.
Coin
,
int32
(
playerCount
))),
Value
:
amountInt64
*
types
.
Coin
,
PlayerNum
:
int32
(
playerCount
),
Fee
:
feeInt64
,
}
}
var
res
string
var
res
string
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"
pokerbull.PokerBullStartTx
"
,
params
,
&
res
)
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"
Chain33.CreateTransaction
"
,
params
,
&
res
)
ctx
.
RunWithoutMarshal
()
ctx
.
RunWithoutMarshal
()
}
}
...
@@ -91,17 +87,15 @@ func addPokerbullContinueFlags(cmd *cobra.Command) {
...
@@ -91,17 +87,15 @@ func addPokerbullContinueFlags(cmd *cobra.Command) {
func
pokerbullContinue
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
func
pokerbullContinue
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameID"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameID"
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
feeInt64
:=
int64
(
fee
*
1e4
)
params
:=
&
pkt
.
PBContinueTxReq
{
params
:=
&
rpctypes
.
CreateTxIn
{
GameId
:
gameID
,
Execer
:
types
.
ExecName
(
pkt
.
PokerBullX
),
Fee
:
feeInt64
,
ActionName
:
pkt
.
CreateContinueTx
,
Payload
:
[]
byte
(
fmt
.
Sprintf
(
"{
\"
gameId
\"
:
\"
%s
\"
}"
,
gameID
)),
}
}
var
res
string
var
res
string
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"
pokerbull.PokerBullContinueTx
"
,
params
,
&
res
)
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"
Chain33.CreateTransaction
"
,
params
,
&
res
)
ctx
.
RunWithoutMarshal
()
ctx
.
RunWithoutMarshal
()
}
}
...
@@ -124,17 +118,15 @@ func addPokerbullQuitFlags(cmd *cobra.Command) {
...
@@ -124,17 +118,15 @@ func addPokerbullQuitFlags(cmd *cobra.Command) {
func
pokerbullQuit
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
func
pokerbullQuit
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameID"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameID"
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
feeInt64
:=
int64
(
fee
*
1e4
)
params
:=
&
rpctypes
.
CreateTxIn
{
Execer
:
types
.
ExecName
(
pkt
.
PokerBullX
),
params
:=
&
pkt
.
PBContinueTxReq
{
ActionName
:
pkt
.
CreatequitTx
,
GameId
:
gameID
,
Payload
:
[]
byte
(
fmt
.
Sprintf
(
"{
\"
gameId
\"
:
\"
%s
\"
}"
,
gameID
)),
Fee
:
feeInt64
,
}
}
var
res
string
var
res
string
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"
pokerbull.PokerBullQuitTx
"
,
params
,
&
res
)
ctx
:=
jsonrpc
.
NewRPCCtx
(
rpcLaddr
,
"
Chain33.CreateTransaction
"
,
params
,
&
res
)
ctx
.
RunWithoutMarshal
()
ctx
.
RunWithoutMarshal
()
}
}
...
...
plugin/dapp/pokerbull/plugin.go
View file @
c40dba14
...
@@ -8,7 +8,6 @@ import (
...
@@ -8,7 +8,6 @@ import (
"github.com/33cn/chain33/pluginmgr"
"github.com/33cn/chain33/pluginmgr"
"github.com/33cn/plugin/plugin/dapp/pokerbull/commands"
"github.com/33cn/plugin/plugin/dapp/pokerbull/commands"
"github.com/33cn/plugin/plugin/dapp/pokerbull/executor"
"github.com/33cn/plugin/plugin/dapp/pokerbull/executor"
"github.com/33cn/plugin/plugin/dapp/pokerbull/rpc"
"github.com/33cn/plugin/plugin/dapp/pokerbull/types"
"github.com/33cn/plugin/plugin/dapp/pokerbull/types"
)
)
...
@@ -18,6 +17,5 @@ func init() {
...
@@ -18,6 +17,5 @@ func init() {
ExecName
:
executor
.
GetName
(),
ExecName
:
executor
.
GetName
(),
Exec
:
executor
.
Init
,
Exec
:
executor
.
Init
,
Cmd
:
commands
.
PokerBullCmd
,
Cmd
:
commands
.
PokerBullCmd
,
RPC
:
rpc
.
Init
,
})
})
}
}
plugin/dapp/pokerbull/proto/pokerbull.proto
View file @
c40dba14
syntax
=
"proto3"
;
syntax
=
"proto3"
;
import
"transaction.proto"
;
package
types
;
package
types
;
//斗牛游戏内容
//斗牛游戏内容
...
@@ -187,12 +185,3 @@ message PBQueryReq {
...
@@ -187,12 +185,3 @@ message PBQueryReq {
int64
fee
=
2
;
int64
fee
=
2
;
}
}
// pokerbull 对外提供服务的接口
service
pokerbull
{
//游戏开始
rpc
Start
(
PBGameStart
)
returns
(
UnsignTx
)
{}
//游戏继续
rpc
Continue
(
PBGameContinue
)
returns
(
UnsignTx
)
{}
//游戏结束
rpc
Quit
(
PBGameQuit
)
returns
(
UnsignTx
)
{}
}
plugin/dapp/pokerbull/rpc/jrpc.go
deleted
100644 → 0
View file @
b4efbed2
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
rpc
import
(
"context"
"encoding/hex"
"github.com/33cn/chain33/types"
pb
"github.com/33cn/plugin/plugin/dapp/pokerbull/types"
)
// PokerBullStartTx 创建游戏开始交易
func
(
c
*
Jrpc
)
PokerBullStartTx
(
parm
*
pb
.
PBStartTxReq
,
result
*
interface
{})
error
{
if
parm
==
nil
{
return
types
.
ErrInvalidParam
}
head
:=
&
pb
.
PBGameStart
{
Value
:
parm
.
Value
,
PlayerNum
:
parm
.
PlayerNum
,
}
reply
,
err
:=
c
.
cli
.
Start
(
context
.
Background
(),
head
)
if
err
!=
nil
{
return
err
}
*
result
=
hex
.
EncodeToString
(
reply
.
Data
)
return
nil
}
// PokerBullContinueTx 创建游戏继续交易
func
(
c
*
Jrpc
)
PokerBullContinueTx
(
parm
*
pb
.
PBContinueTxReq
,
result
*
interface
{})
error
{
if
parm
==
nil
{
return
types
.
ErrInvalidParam
}
head
:=
&
pb
.
PBGameContinue
{
GameId
:
parm
.
GameId
,
}
reply
,
err
:=
c
.
cli
.
Continue
(
context
.
Background
(),
head
)
if
err
!=
nil
{
return
err
}
*
result
=
hex
.
EncodeToString
(
reply
.
Data
)
return
nil
}
// PokerBullQuitTx 创建游戏推出交易
func
(
c
*
Jrpc
)
PokerBullQuitTx
(
parm
*
pb
.
PBQuitTxReq
,
result
*
interface
{})
error
{
if
parm
==
nil
{
return
types
.
ErrInvalidParam
}
head
:=
&
pb
.
PBGameQuit
{
GameId
:
parm
.
GameId
,
}
reply
,
err
:=
c
.
cli
.
Quit
(
context
.
Background
(),
head
)
if
err
!=
nil
{
return
err
}
*
result
=
hex
.
EncodeToString
(
reply
.
Data
)
return
nil
}
// PokerBullQueryTx 创建游戏查询交易
func
(
c
*
Jrpc
)
PokerBullQueryTx
(
parm
*
pb
.
PBQueryReq
,
result
*
interface
{})
error
{
if
parm
==
nil
{
return
types
.
ErrInvalidParam
}
head
:=
&
pb
.
PBGameQuery
{
GameId
:
parm
.
GameId
,
}
reply
,
err
:=
c
.
cli
.
Show
(
context
.
Background
(),
head
)
if
err
!=
nil
{
return
err
}
*
result
=
hex
.
EncodeToString
(
reply
.
Data
)
return
nil
}
plugin/dapp/pokerbull/rpc/jrpc_channel_test.go
View file @
c40dba14
...
@@ -43,6 +43,9 @@ func TestJRPCChannel(t *testing.T) {
...
@@ -43,6 +43,9 @@ func TestJRPCChannel(t *testing.T) {
{
fn
:
testQuitRawTxCmd
},
{
fn
:
testQuitRawTxCmd
},
{
fn
:
testQueryGameByID
},
{
fn
:
testQueryGameByID
},
{
fn
:
testQueryGameByAddr
},
{
fn
:
testQueryGameByAddr
},
{
fn
:
testQueryGameByIDs
},
{
fn
:
testQueryGameByStatus
},
{
fn
:
testQueryGameByRound
},
}
}
for
index
,
testCase
:=
range
testCases
{
for
index
,
testCase
:=
range
testCases
{
err
:=
testCase
.
fn
(
t
,
jrpcClient
)
err
:=
testCase
.
fn
(
t
,
jrpcClient
)
...
@@ -57,29 +60,42 @@ func TestJRPCChannel(t *testing.T) {
...
@@ -57,29 +60,42 @@ func TestJRPCChannel(t *testing.T) {
}
}
func
testStartRawTxCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
func
testStartRawTxCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
params
:=
pty
.
PBStartTxReq
{}
params
:=
&
rpctypes
.
CreateTxIn
{
Execer
:
types
.
ExecName
(
pty
.
PokerBullX
),
ActionName
:
pty
.
CreateStartTx
,
Payload
:
[]
byte
(
""
),
}
var
res
string
var
res
string
return
jrpc
.
Call
(
"
pokerbull.PokerBullStartTx
"
,
params
,
&
res
)
return
jrpc
.
Call
(
"
Chain33.CreateTransaction
"
,
params
,
&
res
)
}
}
func
testContinueRawTxCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
func
testContinueRawTxCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
params
:=
pty
.
PBContinueTxReq
{}
params
:=
&
rpctypes
.
CreateTxIn
{
Execer
:
types
.
ExecName
(
pty
.
PokerBullX
),
ActionName
:
pty
.
CreateContinueTx
,
Payload
:
[]
byte
(
""
),
}
var
res
string
var
res
string
return
jrpc
.
Call
(
"
pokerbull.PokerBullContinueTx
"
,
params
,
&
res
)
return
jrpc
.
Call
(
"
Chain33.CreateTransaction
"
,
params
,
&
res
)
}
}
func
testQuitRawTxCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
func
testQuitRawTxCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
params
:=
pty
.
PBContinueTxReq
{}
params
:=
&
rpctypes
.
CreateTxIn
{
Execer
:
types
.
ExecName
(
pty
.
PokerBullX
),
ActionName
:
pty
.
CreatequitTx
,
Payload
:
[]
byte
(
""
),
}
var
res
string
var
res
string
return
jrpc
.
Call
(
"
pokerbull.PokerBullQuitTx
"
,
params
,
&
res
)
return
jrpc
.
Call
(
"
Chain33.CreateTransaction
"
,
params
,
&
res
)
}
}
func
testQueryGameByID
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
func
testQueryGameByID
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
var
rep
interface
{}
var
rep
interface
{}
var
params
rpctypes
.
Query4Jrpc
var
params
rpctypes
.
Query4Jrpc
req
:=
&
pty
.
QueryPBGameInfo
{}
req
:=
&
pty
.
QueryPBGameInfo
{}
params
.
Execer
=
"pokerbull"
params
.
Execer
=
pty
.
PokerBullX
params
.
FuncName
=
"QueryGameByID"
params
.
FuncName
=
pty
.
FuncNameQueryGameByID
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyPBGame
{}
rep
=
&
pty
.
ReplyPBGame
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
...
@@ -89,9 +105,43 @@ func testQueryGameByAddr(t *testing.T, jrpc *jsonclient.JSONClient) error {
...
@@ -89,9 +105,43 @@ func testQueryGameByAddr(t *testing.T, jrpc *jsonclient.JSONClient) error {
var
rep
interface
{}
var
rep
interface
{}
var
params
rpctypes
.
Query4Jrpc
var
params
rpctypes
.
Query4Jrpc
req
:=
&
pty
.
QueryPBGameInfo
{}
req
:=
&
pty
.
QueryPBGameInfo
{}
params
.
Execer
=
"pokerbull"
params
.
Execer
=
pty
.
PokerBullX
params
.
FuncName
=
"QueryGameByAddr"
params
.
FuncName
=
pty
.
FuncNameQueryGameByAddr
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
PBGameRecords
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
func
testQueryGameByIDs
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
var
rep
interface
{}
var
params
rpctypes
.
Query4Jrpc
req
:=
&
pty
.
QueryPBGameInfos
{}
params
.
Execer
=
pty
.
PokerBullX
params
.
FuncName
=
pty
.
FuncNameQueryGameListByIDs
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
ReplyPBGameList
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
func
testQueryGameByStatus
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
var
rep
interface
{}
var
params
rpctypes
.
Query4Jrpc
req
:=
&
pty
.
QueryPBGameInfo
{}
params
.
Execer
=
pty
.
PokerBullX
params
.
FuncName
=
pty
.
FuncNameQueryGameByStatus
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
PBGameRecords
{}
rep
=
&
pty
.
PBGameRecords
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
}
func
testQueryGameByRound
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
var
rep
interface
{}
var
params
rpctypes
.
Query4Jrpc
req
:=
&
pty
.
QueryPBGameByRound
{}
params
.
Execer
=
pty
.
PokerBullX
params
.
FuncName
=
pty
.
FuncNameQueryGameByRound
params
.
Payload
=
types
.
MustPBToJSON
(
req
)
rep
=
&
pty
.
PBGameRecords
{}
return
jrpc
.
Call
(
"Chain33.Query"
,
params
,
rep
)
}
plugin/dapp/pokerbull/rpc/rpc.go
deleted
100644 → 0
View file @
b4efbed2
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
rpc
import
(
"context"
"github.com/33cn/chain33/types"
pb
"github.com/33cn/plugin/plugin/dapp/pokerbull/types"
"github.com/pkg/errors"
)
func
(
c
*
channelClient
)
Start
(
ctx
context
.
Context
,
head
*
pb
.
PBGameStart
)
(
*
types
.
UnsignTx
,
error
)
{
if
head
.
PlayerNum
>
pb
.
MaxPlayerNum
{
return
nil
,
errors
.
New
(
"Player number should be maximum 5"
)
}
val
:=
&
pb
.
PBGameAction
{
Ty
:
pb
.
PBGameActionStart
,
Value
:
&
pb
.
PBGameAction_Start
{
Start
:
head
},
}
tx
,
err
:=
types
.
CreateFormatTx
(
types
.
ExecName
(
pb
.
PokerBullX
),
types
.
Encode
(
val
))
if
err
!=
nil
{
return
nil
,
err
}
data
:=
types
.
Encode
(
tx
)
return
&
types
.
UnsignTx
{
Data
:
data
},
nil
}
func
(
c
*
channelClient
)
Continue
(
ctx
context
.
Context
,
head
*
pb
.
PBGameContinue
)
(
*
types
.
UnsignTx
,
error
)
{
val
:=
&
pb
.
PBGameAction
{
Ty
:
pb
.
PBGameActionContinue
,
Value
:
&
pb
.
PBGameAction_Continue
{
Continue
:
head
},
}
tx
,
err
:=
types
.
CreateFormatTx
(
types
.
ExecName
(
pb
.
PokerBullX
),
types
.
Encode
(
val
))
if
err
!=
nil
{
return
nil
,
err
}
data
:=
types
.
Encode
(
tx
)
return
&
types
.
UnsignTx
{
Data
:
data
},
nil
}
func
(
c
*
channelClient
)
Quit
(
ctx
context
.
Context
,
head
*
pb
.
PBGameQuit
)
(
*
types
.
UnsignTx
,
error
)
{
val
:=
&
pb
.
PBGameAction
{
Ty
:
pb
.
PBGameActionQuit
,
Value
:
&
pb
.
PBGameAction_Quit
{
Quit
:
head
},
}
tx
,
err
:=
types
.
CreateFormatTx
(
types
.
ExecName
(
pb
.
PokerBullX
),
types
.
Encode
(
val
))
if
err
!=
nil
{
return
nil
,
err
}
data
:=
types
.
Encode
(
tx
)
return
&
types
.
UnsignTx
{
Data
:
data
},
nil
}
func
(
c
*
channelClient
)
Show
(
ctx
context
.
Context
,
head
*
pb
.
PBGameQuery
)
(
*
types
.
UnsignTx
,
error
)
{
val
:=
&
pb
.
PBGameAction
{
Ty
:
pb
.
PBGameActionQuery
,
Value
:
&
pb
.
PBGameAction_Query
{
Query
:
head
},
}
tx
,
err
:=
types
.
CreateFormatTx
(
types
.
ExecName
(
pb
.
PokerBullX
),
types
.
Encode
(
val
))
if
err
!=
nil
{
return
nil
,
err
}
data
:=
types
.
Encode
(
tx
)
return
&
types
.
UnsignTx
{
Data
:
data
},
nil
}
plugin/dapp/pokerbull/rpc/types.go
deleted
100644 → 0
View file @
b4efbed2
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
rpc
import
(
"github.com/33cn/chain33/rpc/types"
)
// Jrpc jrpc句柄
type
Jrpc
struct
{
cli
*
channelClient
}
// Grpc grpc句柄
type
Grpc
struct
{
*
channelClient
}
type
channelClient
struct
{
types
.
ChannelClient
}
// Init 初始化rpc
func
Init
(
name
string
,
s
types
.
RPCServer
)
{
cli
:=
&
channelClient
{}
grpc
:=
&
Grpc
{
channelClient
:
cli
}
cli
.
Init
(
name
,
s
,
&
Jrpc
{
cli
:
cli
},
grpc
)
}
plugin/dapp/pokerbull/types/pokerbull.pb.go
View file @
c40dba14
This diff is collapsed.
Click to expand it.
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