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
93689851
Commit
93689851
authored
Nov 28, 2019
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
fd9cb0d2
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
11 deletions
+18
-11
init.go
plugin/dapp/init/init.go
+1
-1
aes_test.go
plugin/dapp/storage/crypto/aes_test.go
+3
-2
crypto.go
plugin/dapp/storage/crypto/crypto.go
+0
-0
des_test.go
plugin/dapp/storage/crypto/des_test.go
+2
-1
kv.go
plugin/dapp/storage/executor/kv.go
+1
-0
query.go
plugin/dapp/storage/executor/query.go
+0
-1
storage_test.go
plugin/dapp/storage/executor/storage_test.go
+3
-2
storagedb.go
plugin/dapp/storage/executor/storagedb.go
+1
-0
storage.pb.go
plugin/dapp/storage/types/storage.pb.go
+7
-4
No files found.
plugin/dapp/init/init.go
View file @
93689851
...
@@ -20,10 +20,10 @@ import (
...
@@ -20,10 +20,10 @@ import (
_
"github.com/33cn/plugin/plugin/dapp/privacy"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/privacy"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/relay"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/relay"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/retrieve"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/retrieve"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/storage"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/ticket"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/ticket"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/token"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/token"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/trade"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/trade"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/unfreeze"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/unfreeze"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/valnode"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/valnode"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/storage"
//auto gen
)
)
plugin/dapp/storage/crypto/aes_test.go
View file @
93689851
...
@@ -2,13 +2,14 @@ package crypto
...
@@ -2,13 +2,14 @@ package crypto
import
(
import
(
"encoding/base64"
"encoding/base64"
"github.com/stretchr/testify/assert"
"testing"
"testing"
"github.com/stretchr/testify/assert"
)
)
//DES 加解密测试
//DES 加解密测试
func
TestAes
(
t
*
testing
.
T
)
{
func
TestAes
(
t
*
testing
.
T
)
{
aes
:=
NewAES
(
keys
[
2
],
ivs
[
0
])
aes
:=
NewAES
(
keys
[
2
],
ivs
[
0
])
result
,
err
:=
aes
.
Encrypt
(
contents
[
1
])
result
,
err
:=
aes
.
Encrypt
(
contents
[
1
])
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Error
(
err
)
t
.
Error
(
err
)
...
...
plugin/dapp/storage/crypto/crypto.go
View file @
93689851
plugin/dapp/storage/crypto/des_test.go
View file @
93689851
...
@@ -2,8 +2,9 @@ package crypto
...
@@ -2,8 +2,9 @@ package crypto
import
(
import
(
"encoding/base64"
"encoding/base64"
"github.com/stretchr/testify/assert"
"testing"
"testing"
"github.com/stretchr/testify/assert"
)
)
var
(
var
(
...
...
plugin/dapp/storage/executor/kv.go
View file @
93689851
...
@@ -12,6 +12,7 @@ var (
...
@@ -12,6 +12,7 @@ var (
//KeyPrefixLocalDB local db的key必须前缀
//KeyPrefixLocalDB local db的key必须前缀
KeyPrefixLocalDB
=
"LODB-storage-"
KeyPrefixLocalDB
=
"LODB-storage-"
)
)
// Key Storage to save key
// Key Storage to save key
func
Key
(
txHash
string
)
(
key
[]
byte
)
{
func
Key
(
txHash
string
)
(
key
[]
byte
)
{
key
=
append
(
key
,
[]
byte
(
KeyPrefixStateDB
)
...
)
key
=
append
(
key
,
[]
byte
(
KeyPrefixStateDB
)
...
)
...
...
plugin/dapp/storage/executor/query.go
View file @
93689851
...
@@ -5,7 +5,6 @@ import (
...
@@ -5,7 +5,6 @@ import (
storagetypes
"github.com/33cn/plugin/plugin/dapp/storage/types"
storagetypes
"github.com/33cn/plugin/plugin/dapp/storage/types"
)
)
//从statedb 读取原始数据
//从statedb 读取原始数据
func
(
s
*
storage
)
Query_QueryStorage
(
in
*
storagetypes
.
QueryStorage
)
(
types
.
Message
,
error
)
{
func
(
s
*
storage
)
Query_QueryStorage
(
in
*
storagetypes
.
QueryStorage
)
(
types
.
Message
,
error
)
{
return
QueryStorage
(
s
.
GetStateDB
(),
in
)
return
QueryStorage
(
s
.
GetStateDB
(),
in
)
...
...
plugin/dapp/storage/executor/storage_test.go
View file @
93689851
package
executor
package
executor
import
(
import
(
"math/rand"
"testing"
"github.com/33cn/chain33/account"
"github.com/33cn/chain33/account"
"github.com/33cn/chain33/client"
"github.com/33cn/chain33/client"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util"
"github.com/33cn/chain33/util"
"math/rand"
"testing"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/common/crypto"
...
...
plugin/dapp/storage/executor/storagedb.go
View file @
93689851
...
@@ -2,6 +2,7 @@ package executor
...
@@ -2,6 +2,7 @@ package executor
import
(
import
(
"fmt"
"fmt"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/common"
dbm
"github.com/33cn/chain33/common/db"
dbm
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
...
...
plugin/dapp/storage/types/storage.pb.go
View file @
93689851
...
@@ -22,12 +22,15 @@ It has these top-level messages:
...
@@ -22,12 +22,15 @@ It has these top-level messages:
*/
*/
package
types
package
types
import
proto
"github.com/golang/protobuf/proto"
import
fmt
"fmt"
import
math
"math"
import
(
import
(
fmt
"fmt"
proto
"github.com/golang/protobuf/proto"
math
"math"
context
"golang.org/x/net/context"
context
"golang.org/x/net/context"
grpc
"google.golang.org/grpc"
grpc
"google.golang.org/grpc"
)
)
...
...
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