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
d34b1c84
Commit
d34b1c84
authored
Apr 01, 2020
by
harrylee
Committed by
vipwzw
Apr 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make linter
parent
1e42fcd4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
exec_local.go
plugin/dapp/storage/executor/exec_local.go
+0
-3
storage_test.go
plugin/dapp/storage/executor/storage_test.go
+3
-3
No files found.
plugin/dapp/storage/executor/exec_local.go
View file @
d34b1c84
package
executor
package
executor
import
(
import
(
"fmt"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
ety
"github.com/33cn/plugin/plugin/dapp/storage/types"
ety
"github.com/33cn/plugin/plugin/dapp/storage/types"
)
)
...
@@ -22,7 +20,6 @@ func (s *storage) ExecLocal_ContentStorage(payload *ety.ContentOnlyNotaryStorage
...
@@ -22,7 +20,6 @@ func (s *storage) ExecLocal_ContentStorage(payload *ety.ContentOnlyNotaryStorage
if
err
:=
types
.
Decode
(
log
.
Log
,
storage
);
err
!=
nil
{
if
err
:=
types
.
Decode
(
log
.
Log
,
storage
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
fmt
.
Println
(
string
(
storage
.
GetContentStorage
()
.
Key
))
kv
:=
&
types
.
KeyValue
{
Key
:
getLocalDBKey
(
storage
.
GetContentStorage
()
.
Key
),
Value
:
types
.
Encode
(
storage
)}
kv
:=
&
types
.
KeyValue
{
Key
:
getLocalDBKey
(
storage
.
GetContentStorage
()
.
Key
),
Value
:
types
.
Encode
(
storage
)}
dbSet
.
KV
=
append
(
dbSet
.
KV
,
kv
)
dbSet
.
KV
=
append
(
dbSet
.
KV
,
kv
)
}
}
...
...
plugin/dapp/storage/executor/storage_test.go
View file @
d34b1c84
...
@@ -185,7 +185,7 @@ func signTx(tx *types.Transaction, hexPrivKey string) (*types.Transaction, error
...
@@ -185,7 +185,7 @@ 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
QueryStorageByKey
(
stateDB
dbm
.
DB
,
kvdb
dbm
.
KVDB
,
key
string
,
cfg
*
types
.
Chain33Config
)
(
*
oty
.
Storage
,
error
)
{
func
QueryStorageByKey
(
stateDB
dbm
.
KV
,
kvdb
dbm
.
KVDB
,
key
string
,
cfg
*
types
.
Chain33Config
)
(
*
oty
.
Storage
,
error
)
{
exec
:=
newStorage
()
exec
:=
newStorage
()
q
:=
queue
.
New
(
"channel"
)
q
:=
queue
.
New
(
"channel"
)
q
.
SetConfig
(
cfg
)
q
.
SetConfig
(
cfg
)
...
@@ -201,7 +201,7 @@ func QueryStorageByKey(stateDB dbm.DB, kvdb dbm.KVDB, key string, cfg *types.Cha
...
@@ -201,7 +201,7 @@ func QueryStorageByKey(stateDB dbm.DB, kvdb dbm.KVDB, key string, cfg *types.Cha
}
}
return
msg
.
(
*
oty
.
Storage
),
nil
return
msg
.
(
*
oty
.
Storage
),
nil
}
}
func
QueryBatchStorageByKey
(
stateDB
dbm
.
DB
,
kvdb
dbm
.
KVDB
,
para
*
oty
.
BatchQueryStorage
,
cfg
*
types
.
Chain33Config
)
(
*
oty
.
BatchReplyStorage
,
error
)
{
func
QueryBatchStorageByKey
(
stateDB
dbm
.
KV
,
kvdb
dbm
.
KVDB
,
para
*
oty
.
BatchQueryStorage
,
cfg
*
types
.
Chain33Config
)
(
*
oty
.
BatchReplyStorage
,
error
)
{
exec
:=
newStorage
()
exec
:=
newStorage
()
q
:=
queue
.
New
(
"channel"
)
q
:=
queue
.
New
(
"channel"
)
q
.
SetConfig
(
cfg
)
q
.
SetConfig
(
cfg
)
...
@@ -226,7 +226,7 @@ func CreateTx(action string, message types.Message, priv string, cfg *types.Chai
...
@@ -226,7 +226,7 @@ func CreateTx(action string, message types.Message, priv string, cfg *types.Chai
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
tx
,
err
=
signTx
(
tx
,
PrivKeyA
)
tx
,
err
=
signTx
(
tx
,
priv
)
return
tx
,
err
return
tx
,
err
}
}
...
...
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