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
225d3319
Commit
225d3319
authored
Nov 15, 2019
by
pengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#627 add collateralize unit test
parent
fd74b16e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
12 deletions
+2
-12
collateralize_test.go
plugin/dapp/collateralize/executor/collateralize_test.go
+0
-0
keys.go
plugin/dapp/collateralize/executor/keys.go
+2
-2
issuance_test.go
plugin/dapp/issuance/executor/issuance_test.go
+0
-10
No files found.
plugin/dapp/collateralize/executor/collateralize_test.go
0 → 100644
View file @
225d3319
This diff is collapsed.
Click to expand it.
plugin/dapp/collateralize/executor/keys.go
View file @
225d3319
...
@@ -37,12 +37,12 @@ func calcCollateralizePriceKey(time string) []byte {
...
@@ -37,12 +37,12 @@ func calcCollateralizePriceKey(time string) []byte {
}
}
func
calcCollateralizeRecordAddrPrefix
(
addr
string
)
[]
byte
{
func
calcCollateralizeRecordAddrPrefix
(
addr
string
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-collateralize-record-addr:%
d
"
,
addr
)
key
:=
fmt
.
Sprintf
(
"LODB-collateralize-record-addr:%
s
"
,
addr
)
return
[]
byte
(
key
)
return
[]
byte
(
key
)
}
}
func
calcCollateralizeRecordAddrKey
(
addr
string
,
index
int64
)
[]
byte
{
func
calcCollateralizeRecordAddrKey
(
addr
string
,
index
int64
)
[]
byte
{
key
:=
fmt
.
Sprintf
(
"LODB-collateralize-record-addr:%
d
:%018d"
,
addr
,
index
)
key
:=
fmt
.
Sprintf
(
"LODB-collateralize-record-addr:%
s
:%018d"
,
addr
,
index
)
return
[]
byte
(
key
)
return
[]
byte
(
key
)
}
}
...
...
plugin/dapp/issuance/executor/issuance_test.go
View file @
225d3319
...
@@ -519,12 +519,3 @@ func signTx(tx *types.Transaction, hexPrivKey string) (*types.Transaction, error
...
@@ -519,12 +519,3 @@ func signTx(tx *types.Transaction, hexPrivKey string) (*types.Transaction, error
tx
.
Sign
(
int32
(
signType
),
privKey
)
tx
.
Sign
(
int32
(
signType
),
privKey
)
return
tx
,
nil
return
tx
,
nil
}
}
//func TestSlice(t *testing.T) {
// var a []int
// a = append(a, 1)
// fmt.Println(a)
//
// a = append(a[:0], a[1:]...)
// fmt.Println(a)
//}
\ No newline at end of file
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