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
13c2669f
Commit
13c2669f
authored
Nov 29, 2018
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test
parent
8898b5a7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
20 deletions
+13
-20
para_test.go
plugin/consensus/para/para_test.go
+5
-7
raftPerf.go
plugin/consensus/raft/tools/raftPerf.go
+1
-1
assettransfer_test.go
plugin/dapp/paracross/executor/assettransfer_test.go
+2
-2
assetwithdraw_test.go
plugin/dapp/paracross/executor/assetwithdraw_test.go
+1
-1
paracross_test.go
plugin/dapp/paracross/executor/paracross_test.go
+2
-2
privacy_test.go
plugin/dapp/privacy/wallet/privacy_test.go
+1
-1
token_new_test.go
plugin/dapp/token/executor/token_new_test.go
+1
-6
No files found.
plugin/consensus/para/para_test.go
View file @
13c2669f
...
@@ -7,14 +7,12 @@ package para
...
@@ -7,14 +7,12 @@ package para
import
(
import
(
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/assert"
//"github.com/stretchr/testify/mock"
//"github.com/stretchr/testify/mock"
"testing"
"github.com/33cn/chain33/types"
"math/rand"
"math/rand"
"testing"
"time"
"time"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/types"
pt
"github.com/33cn/plugin/plugin/dapp/paracross/types"
pt
"github.com/33cn/plugin/plugin/dapp/paracross/types"
)
)
...
@@ -124,7 +122,7 @@ func createMainTx(exec string, to string) (*types.Transaction, error) {
...
@@ -124,7 +122,7 @@ func createMainTx(exec string, to string) (*types.Transaction, error) {
To
:
to
,
To
:
to
,
Amount
:
Amount
,
Amount
:
Amount
,
Fee
:
0
,
Fee
:
0
,
Note
:
"test"
,
Note
:
[]
byte
(
"test"
)
,
TokenSymbol
:
""
,
TokenSymbol
:
""
,
ExecName
:
exec
,
ExecName
:
exec
,
}
}
...
@@ -150,7 +148,7 @@ func createCrossMainTx(to string) (*types.Transaction, error) {
...
@@ -150,7 +148,7 @@ func createCrossMainTx(to string) (*types.Transaction, error) {
To
:
string
(
to
),
To
:
string
(
to
),
Amount
:
Amount
,
Amount
:
Amount
,
Fee
:
0
,
Fee
:
0
,
Note
:
"test asset transfer"
,
Note
:
[]
byte
(
"test asset transfer"
)
,
IsWithdraw
:
false
,
IsWithdraw
:
false
,
IsToken
:
false
,
IsToken
:
false
,
TokenSymbol
:
""
,
TokenSymbol
:
""
,
...
@@ -178,7 +176,7 @@ func createCrossParaTx(to string, amount int64) (*types.Transaction, error) {
...
@@ -178,7 +176,7 @@ func createCrossParaTx(to string, amount int64) (*types.Transaction, error) {
To
:
string
(
to
),
To
:
string
(
to
),
Amount
:
amount
,
Amount
:
amount
,
Fee
:
0
,
Fee
:
0
,
Note
:
"test asset transfer"
,
Note
:
[]
byte
(
"test asset transfer"
)
,
IsWithdraw
:
false
,
IsWithdraw
:
false
,
IsToken
:
false
,
IsToken
:
false
,
TokenSymbol
:
""
,
TokenSymbol
:
""
,
...
...
plugin/consensus/raft/tools/raftPerf.go
View file @
13c2669f
...
@@ -149,7 +149,7 @@ func SendToAddress(from string, to string, amount string, note string) {
...
@@ -149,7 +149,7 @@ func SendToAddress(from string, to string, amount string, note string) {
return
return
}
}
amountInt64
:=
int64
(
amountFloat64
*
1e4
)
amountInt64
:=
int64
(
amountFloat64
*
1e4
)
tx
:=
&
types
.
ReqWalletSendToAddress
{
From
:
from
,
To
:
to
,
Amount
:
amountInt64
*
1e4
,
Note
:
note
}
tx
:=
&
types
.
ReqWalletSendToAddress
{
From
:
from
,
To
:
to
,
Amount
:
amountInt64
*
1e4
,
Note
:
[]
byte
(
note
)
}
reply
,
err
:=
c
.
SendToAddress
(
context
.
Background
(),
tx
)
reply
,
err
:=
c
.
SendToAddress
(
context
.
Background
(),
tx
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
plugin/dapp/paracross/executor/assettransfer_test.go
View file @
13c2669f
...
@@ -190,7 +190,7 @@ func createAssetTransferTx(s suite.Suite, privFrom string, to []byte) (*types.Tr
...
@@ -190,7 +190,7 @@ func createAssetTransferTx(s suite.Suite, privFrom string, to []byte) (*types.Tr
To
:
string
(
to
),
To
:
string
(
to
),
Amount
:
Amount
,
Amount
:
Amount
,
Fee
:
0
,
Fee
:
0
,
Note
:
"test asset transfer"
,
Note
:
[]
byte
(
"test asset transfer"
)
,
IsWithdraw
:
false
,
IsWithdraw
:
false
,
IsToken
:
false
,
IsToken
:
false
,
TokenSymbol
:
""
,
TokenSymbol
:
""
,
...
@@ -294,7 +294,7 @@ func createAssetTransferTokenTx(s suite.Suite, privFrom string, to []byte) (*typ
...
@@ -294,7 +294,7 @@ func createAssetTransferTokenTx(s suite.Suite, privFrom string, to []byte) (*typ
To
:
string
(
to
),
To
:
string
(
to
),
Amount
:
Amount
,
Amount
:
Amount
,
Fee
:
0
,
Fee
:
0
,
Note
:
"test asset transfer"
,
Note
:
[]
byte
(
"test asset transfer"
)
,
IsWithdraw
:
false
,
IsWithdraw
:
false
,
IsToken
:
false
,
IsToken
:
false
,
TokenSymbol
:
TestSymbol
,
TokenSymbol
:
TestSymbol
,
...
...
plugin/dapp/paracross/executor/assetwithdraw_test.go
View file @
13c2669f
...
@@ -252,7 +252,7 @@ func createAssetWithdrawTx(s suite.Suite, privFrom string, to []byte) (*types.Tr
...
@@ -252,7 +252,7 @@ func createAssetWithdrawTx(s suite.Suite, privFrom string, to []byte) (*types.Tr
To
:
string
(
to
),
To
:
string
(
to
),
Amount
:
Amount
,
Amount
:
Amount
,
Fee
:
0
,
Fee
:
0
,
Note
:
"test asset transfer"
,
Note
:
[]
byte
(
"test asset transfer"
)
,
IsWithdraw
:
true
,
IsWithdraw
:
true
,
IsToken
:
false
,
IsToken
:
false
,
TokenSymbol
:
""
,
TokenSymbol
:
""
,
...
...
plugin/dapp/paracross/executor/paracross_test.go
View file @
13c2669f
...
@@ -467,7 +467,7 @@ func createCrossMainTx(to []byte) (*types.Transaction, error) {
...
@@ -467,7 +467,7 @@ func createCrossMainTx(to []byte) (*types.Transaction, error) {
To
:
string
(
to
),
To
:
string
(
to
),
Amount
:
Amount
,
Amount
:
Amount
,
Fee
:
0
,
Fee
:
0
,
Note
:
"test asset transfer"
,
Note
:
[]
byte
(
"test asset transfer"
)
,
IsWithdraw
:
false
,
IsWithdraw
:
false
,
IsToken
:
false
,
IsToken
:
false
,
TokenSymbol
:
""
,
TokenSymbol
:
""
,
...
@@ -495,7 +495,7 @@ func createCrossParaTx(s suite.Suite, to []byte) (*types.Transaction, error) {
...
@@ -495,7 +495,7 @@ func createCrossParaTx(s suite.Suite, to []byte) (*types.Transaction, error) {
To
:
string
(
to
),
To
:
string
(
to
),
Amount
:
Amount
,
Amount
:
Amount
,
Fee
:
0
,
Fee
:
0
,
Note
:
"test asset transfer"
,
Note
:
[]
byte
(
"test asset transfer"
)
,
IsWithdraw
:
false
,
IsWithdraw
:
false
,
IsToken
:
false
,
IsToken
:
false
,
TokenSymbol
:
""
,
TokenSymbol
:
""
,
...
...
plugin/dapp/privacy/wallet/privacy_test.go
View file @
13c2669f
...
@@ -204,7 +204,7 @@ func (mock *PrivacyMock) createPublic2PrivacyTx(req *types.ReqCreateTransaction)
...
@@ -204,7 +204,7 @@ func (mock *PrivacyMock) createPublic2PrivacyTx(req *types.ReqCreateTransaction)
value
:=
&
ty
.
Public2Privacy
{
value
:=
&
ty
.
Public2Privacy
{
Tokenname
:
req
.
Tokenname
,
Tokenname
:
req
.
Tokenname
,
Amount
:
amount
,
Amount
:
amount
,
Note
:
req
.
GetNote
(
),
Note
:
string
(
req
.
GetNote
()
),
Output
:
privacyOutput
,
Output
:
privacyOutput
,
}
}
action
:=
&
ty
.
PrivacyAction
{
action
:=
&
ty
.
PrivacyAction
{
...
...
plugin/dapp/token/executor/token_new_test.go
View file @
13c2669f
...
@@ -6,18 +6,13 @@ package executor
...
@@ -6,18 +6,13 @@ package executor
import
(
import
(
"context"
"context"
//crand "crypto/rand"
//"encoding/json"
"errors"
"errors"
"fmt"
"fmt"
"math/rand"
"math/rand"
"strconv"
"strconv"
//"strings"
"testing"
"testing"
"time"
"time"
//"github.com/golang/protobuf/proto"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/common/crypto"
...
@@ -243,7 +238,7 @@ func TestTransferToken(t *testing.T) {
...
@@ -243,7 +238,7 @@ func TestTransferToken(t *testing.T) {
fmt
.
Println
(
"TestTransferToken start"
)
fmt
.
Println
(
"TestTransferToken start"
)
defer
fmt
.
Println
(
"TestTransferToken end"
)
defer
fmt
.
Println
(
"TestTransferToken end"
)
v
:=
&
tokenty
.
TokenAction_Transfer
{
Transfer
:
&
types
.
AssetsTransfer
{
Cointoken
:
tokenSym
,
Amount
:
transAmount
,
Note
:
""
,
To
:
transToAddr
}}
v
:=
&
tokenty
.
TokenAction_Transfer
{
Transfer
:
&
types
.
AssetsTransfer
{
Cointoken
:
tokenSym
,
Amount
:
transAmount
,
Note
:
[]
byte
(
""
)
,
To
:
transToAddr
}}
transfer
:=
&
tokenty
.
TokenAction
{
Value
:
v
,
Ty
:
tokenty
.
ActionTransfer
}
transfer
:=
&
tokenty
.
TokenAction
{
Value
:
v
,
Ty
:
tokenty
.
ActionTransfer
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execName
),
Payload
:
types
.
Encode
(
transfer
),
Fee
:
fee
,
To
:
addrexec
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execName
),
Payload
:
types
.
Encode
(
transfer
),
Fee
:
fee
,
To
:
addrexec
}
...
...
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