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
6424050b
Commit
6424050b
authored
Nov 26, 2018
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix linter
parent
92b0e754
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
16 additions
and
18 deletions
+16
-18
tendermint_test.go
plugin/consensus/tendermint/tendermint_test.go
+1
-1
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
+1
-1
rpc_channel_test.go
plugin/dapp/privacy/rpc/rpc_channel_test.go
+1
-1
rpc_real_test.go
plugin/dapp/privacy/rpc/rpc_real_test.go
+2
-2
types_test.go
plugin/dapp/privacy/types/types_test.go
+1
-2
privacy_test.go
plugin/dapp/privacy/wallet/privacy_test.go
+1
-2
jrpc_channel_test.go
plugin/dapp/relay/rpc/jrpc_channel_test.go
+2
-2
jrpc_channel_test.go
plugin/dapp/retrieve/rpc/jrpc_channel_test.go
+1
-1
jrpc_channel_test.go
plugin/dapp/ticket/rpc/jrpc_channel_test.go
+1
-1
rpc_test.go
plugin/dapp/ticket/rpc/rpc_test.go
+1
-1
jrpc_channel_test.go
plugin/dapp/token/rpc/jrpc_channel_test.go
+1
-1
rpc_real_test.go
plugin/dapp/token/rpc/rpc_real_test.go
+1
-1
jrpc_channel_test.go
plugin/dapp/trade/rpc/jrpc_channel_test.go
+1
-1
No files found.
plugin/consensus/tendermint/tendermint_test.go
View file @
6424050b
...
...
@@ -99,7 +99,7 @@ func initEnvTendermint() (queue.Queue, *blockchain.BlockChain, queue.Module, *me
network
.
SetQueueClient
(
q
.
Client
())
rpc
.
InitCfg
(
cfg
.
R
pc
)
rpc
.
InitCfg
(
cfg
.
R
PC
)
gapi
:=
rpc
.
NewGRpcServer
(
q
.
Client
(),
nil
)
go
gapi
.
Listen
()
return
q
,
chain
,
s
,
mem
,
exec
,
cs
,
network
...
...
plugin/dapp/blackwhite/rpc/jrpc_channel_test.go
View file @
6424050b
...
...
@@ -31,7 +31,7 @@ func TestJRPCChannel(t *testing.T) {
}()
mocker
.
Listen
()
jrpcClient
:=
mocker
.
GetJ
son
C
()
jrpcClient
:=
mocker
.
GetJ
SON
C
()
assert
.
NotNil
(
t
,
jrpcClient
)
testCases
:=
[]
struct
{
...
...
plugin/dapp/pokerbull/rpc/jrpc_channel_test.go
View file @
6424050b
...
...
@@ -31,7 +31,7 @@ func TestJRPCChannel(t *testing.T) {
}()
mocker
.
Listen
()
jrpcClient
:=
mocker
.
GetJ
son
C
()
jrpcClient
:=
mocker
.
GetJ
SON
C
()
assert
.
NotNil
(
t
,
jrpcClient
)
testCases
:=
[]
struct
{
...
...
plugin/dapp/privacy/rpc/rpc_channel_test.go
View file @
6424050b
...
...
@@ -34,7 +34,7 @@ func TestRPCChannel(t *testing.T) {
}()
mocker
.
Listen
()
rpcCfg
:=
mocker
.
GetCfg
()
.
R
pc
rpcCfg
:=
mocker
.
GetCfg
()
.
R
PC
jrpcClient
,
err
:=
jsonclient
.
NewJSONClient
(
fmt
.
Sprintf
(
"http://%s/"
,
rpcCfg
.
JrpcBindAddr
))
assert
.
NoError
(
t
,
err
)
assert
.
NotNil
(
t
,
jrpcClient
)
...
...
plugin/dapp/privacy/rpc/rpc_real_test.go
View file @
6424050b
...
...
@@ -34,7 +34,7 @@ func TestRPC_Call(t *testing.T) {
mock33
.
Listen
()
time
.
Sleep
(
time
.
Millisecond
)
api
.
On
(
"Close"
)
.
Return
()
rpcCfg
:=
mock33
.
GetCfg
()
.
R
pc
rpcCfg
:=
mock33
.
GetCfg
()
.
R
PC
jsonClient
,
err
:=
jsonclient
.
NewJSONClient
(
"http://"
+
rpcCfg
.
JrpcBindAddr
+
"/"
)
assert
.
Nil
(
t
,
err
)
assert
.
NotNil
(
t
,
jsonClient
)
...
...
@@ -61,6 +61,6 @@ func TestJsonToPB(t *testing.T) {
jsonStr
:=
`{"utxoHaveTxHashs":[{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"200000000","txHash":"230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x230ef9ecd3be28b1b2b22d2c3aba58aa72b90dc0231e5922609ad9f5f75a5fcf","outindex":0},"onetimePubkey":"0xa82a79ccf75f67e15c45905a651ad55bb08d935f39a353079f8576bb00722d15"}},{"amount":"500000000","txHash":"aa50a7c0b83d9c1eb9edb3f8da4d52df0bbc337db7aff4d1ae165bfa5f7a13fe","utxoBasic":{"utxoGlobalIndex":{"txhash":"0xf70df4c801db3e3759d20ccb8e4565906691680e411bef2a73ddbf53115d4d26","outindex":13},"onetimePubkey":"0x42353b06625107408ffc72dc59e101ea8e2f144d0364caff2e649e782533fdc0"}},{"amount":"100000000","txHash":"bd4f3e9963b762b769f5c40a9afe83fa968e2b1e936682ecc02b07958c321305","utxoBasic":{"utxoGlobalIndex":{"txhash":"0x2c4aa7aea82de4a971bceb6cfef3d09dbeac7c7df3a4b49b5a311d23d772f027","outindex":2},"onetimePubkey":"0xd13f979b2b4e269c738413e810aa3b30c3e6cd600573f7287202403198179a03"}},{"amount":"500000000","txHash":"bd4f3e9963b762b769f5c40a9afe83fa968e2b1e936682ecc02b07958c321305","utxoBasic":{"utxoGlobalIndex":{"txhash":"0xf70df4c801db3e3759d20ccb8e4565906691680e411bef2a73ddbf53115d4d26","outindex":5},"onetimePubkey":"0xe3605ab776be46c1baee4e0377bd284c51320d48d93c514f301624078086fc8c"}},{"amount":"500000000","txHash":"e6e98297f741d8649c9a520c494b9abab6803a2179f8f0eaa19614571fc709cf","utxoBasic":{"utxoGlobalIndex":{"txhash":"0xf70df4c801db3e3759d20ccb8e4565906691680e411bef2a73ddbf53115d4d26","outindex":12},"onetimePubkey":"0x370bd63e8d6bae4f004f21d5fdbd0ad0b0cbd4052968f75332dfb9920a963f52"}}]}`
var
res
pty
.
UTXOHaveTxHashs
err
:=
types
.
J
son
ToPB
([]
byte
(
jsonStr
),
&
res
)
err
:=
types
.
J
SON
ToPB
([]
byte
(
jsonStr
),
&
res
)
assert
.
NoError
(
t
,
err
)
}
plugin/dapp/privacy/types/types_test.go
View file @
6424050b
...
...
@@ -30,7 +30,6 @@ func TestReplyPrivacyAccount(t *testing.T) {
reply
.
Utxos
.
Utxos
=
append
(
reply
.
Utxos
.
Utxos
,
utxo
)
reply
.
Ftxos
.
Utxos
=
append
(
reply
.
Ftxos
.
Utxos
,
utxo
)
}
_
,
err
:=
types
.
PBToJson
(
reply
)
_
,
err
:=
types
.
PBToJSON
(
reply
)
assert
.
NoError
(
t
,
err
)
}
plugin/dapp/privacy/wallet/privacy_test.go
View file @
6424050b
...
...
@@ -218,9 +218,8 @@ func (mock *PrivacyMock) createPublic2PrivacyTx(req *types.ReqCreateTransaction)
To
:
address
.
ExecAddress
(
ty
.
PrivacyX
),
}
txSize
:=
types
.
Size
(
tx
)
+
types
.
SignatureSize
realFee
:=
int64
((
txSize
+
1023
)
>>
types
.
Size
_1K_
shiftlen
)
*
types
.
GInt
(
"MinFee"
)
realFee
:=
int64
((
txSize
+
1023
)
>>
types
.
Size
1K
shiftlen
)
*
types
.
GInt
(
"MinFee"
)
tx
.
Fee
=
realFee
tx
.
SetExpire
(
time
.
Hour
)
return
tx
}
plugin/dapp/relay/rpc/jrpc_channel_test.go
View file @
6424050b
...
...
@@ -32,7 +32,7 @@ func TestJRPCChannel(t *testing.T) {
}()
mocker
.
Listen
()
jrpcClient
:=
mocker
.
GetJ
son
C
()
jrpcClient
:=
mocker
.
GetJ
SON
C
()
assert
.
NotNil
(
t
,
jrpcClient
)
testCases
:=
[]
struct
{
...
...
@@ -145,7 +145,7 @@ func testCreateRawRelayBtcHeaderCmd(t *testing.T, jrpc *jsonclient.JSONClient) e
func
testGetBTCHeaderCurHeight
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
var
params
rpctypes
.
Query4Jrpc
req
:=
&
pty
.
ReqRelayBtcHeaderHeightList
{}
js
,
err
:=
types
.
PBToJ
son
(
req
)
js
,
err
:=
types
.
PBToJ
SON
(
req
)
assert
.
Nil
(
t
,
err
)
params
.
Execer
=
"relay"
params
.
FuncName
=
"GetBTCHeaderCurHeight"
...
...
plugin/dapp/retrieve/rpc/jrpc_channel_test.go
View file @
6424050b
...
...
@@ -32,7 +32,7 @@ func TestJRPCChannel(t *testing.T) {
}()
mocker
.
Listen
()
jrpcClient
:=
mocker
.
GetJ
son
C
()
jrpcClient
:=
mocker
.
GetJ
SON
C
()
testCases
:=
[]
struct
{
fn
func
(
*
testing
.
T
,
*
jsonclient
.
JSONClient
)
error
...
...
plugin/dapp/ticket/rpc/jrpc_channel_test.go
View file @
6424050b
...
...
@@ -22,7 +22,7 @@ func TestJRPCChannel(t *testing.T) {
defer
mocker
.
Close
()
mocker
.
Listen
()
jrpcClient
:=
mocker
.
GetJ
son
C
()
jrpcClient
:=
mocker
.
GetJ
SON
C
()
testCases
:=
[]
struct
{
fn
func
(
*
testing
.
T
,
*
jsonclient
.
JSONClient
)
error
...
...
plugin/dapp/ticket/rpc/rpc_test.go
View file @
6424050b
...
...
@@ -141,7 +141,7 @@ func TestRPC_CallTestNode(t *testing.T) {
}
api
.
On
(
"IsSync"
)
.
Return
(
ret
,
nil
)
api
.
On
(
"Close"
)
.
Return
()
rpcCfg
:=
mock33
.
GetCfg
()
.
R
pc
rpcCfg
:=
mock33
.
GetCfg
()
.
R
PC
jsonClient
,
err
:=
jsonclient
.
NewJSONClient
(
"http://"
+
rpcCfg
.
JrpcBindAddr
+
"/"
)
assert
.
Nil
(
t
,
err
)
assert
.
NotNil
(
t
,
jsonClient
)
...
...
plugin/dapp/token/rpc/jrpc_channel_test.go
View file @
6424050b
...
...
@@ -27,7 +27,7 @@ func TestJRPCChannel(t *testing.T) {
}()
mocker
.
Listen
()
jrpcClient
:=
mocker
.
GetJ
son
C
()
jrpcClient
:=
mocker
.
GetJ
SON
C
()
testCases
:=
[]
struct
{
fn
func
(
*
testing
.
T
,
*
jsonclient
.
JSONClient
)
error
...
...
plugin/dapp/token/rpc/rpc_real_test.go
View file @
6424050b
...
...
@@ -44,7 +44,7 @@ func TestRPCTokenPreCreate(t *testing.T) {
Owner
:
mock33
.
GetHotAddress
(),
}
var
txhex
string
err
=
mock33
.
GetJ
son
C
()
.
Call
(
"token.CreateRawTokenPreCreateTx"
,
param
,
&
txhex
)
err
=
mock33
.
GetJ
SON
C
()
.
Call
(
"token.CreateRawTokenPreCreateTx"
,
param
,
&
txhex
)
assert
.
Nil
(
t
,
err
)
hash
,
err
:=
mock33
.
SendAndSign
(
mock33
.
GetHotKey
(),
txhex
)
assert
.
Nil
(
t
,
err
)
...
...
plugin/dapp/trade/rpc/jrpc_channel_test.go
View file @
6424050b
...
...
@@ -31,7 +31,7 @@ func TestJRPCChannel(t *testing.T) {
}()
mocker
.
Listen
()
jrpcClient
:=
mocker
.
GetJ
son
C
()
jrpcClient
:=
mocker
.
GetJ
SON
C
()
testCases
:=
[]
struct
{
fn
func
(
*
testing
.
T
,
*
jsonclient
.
JSONClient
)
error
...
...
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