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
e4596fe8
Commit
e4596fe8
authored
Jun 23, 2020
by
harrylee
Committed by
33cn
Jun 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update accountmanager
parent
01d20edd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
25 deletions
+8
-25
build.sh
plugin/dapp/accountmanager/cmd/build.sh
+2
-2
accountdb.go
plugin/dapp/accountmanager/executor/accountdb.go
+2
-19
build.sh
plugin/dapp/exchange/cmd/build.sh
+2
-2
build.sh
plugin/dapp/storage/cmd/build.sh
+2
-2
No files found.
plugin/dapp/accountmanager/cmd/build.sh
View file @
e4596fe8
...
...
@@ -7,5 +7,5 @@ strapp=${strcmd%/cmd*}
OUT_DIR
=
"
${
1
}
/
$strapp
"
#FLAG=$2
mkdir
-p
"
${
OUT_DIR
}
"
cp
./build/
*
"
${
OUT_DIR
}
"
#
mkdir -p "${OUT_DIR}"
#
cp ./build/* "${OUT_DIR}"
plugin/dapp/accountmanager/executor/accountdb.go
View file @
e4596fe8
...
...
@@ -200,10 +200,6 @@ func (a *Action) Supervise(payload *et.Supervise) (*types.Receipt, error) {
if
managerAddr
!=
a
.
fromaddr
{
return
nil
,
et
.
ErrNotAdmin
}
coinsAssetDB
,
err
:=
account
.
NewAccountDB
(
cfg
,
"coins"
,
cfg
.
GetCoinSymbol
(),
a
.
statedb
)
if
err
!=
nil
{
return
nil
,
err
}
var
logs
[]
*
types
.
ReceiptLog
var
kvs
[]
*
types
.
KeyValue
var
re
et
.
SuperviseReceipt
...
...
@@ -215,25 +211,12 @@ func (a *Action) Supervise(payload *et.Supervise) (*types.Receipt, error) {
}
switch
payload
.
Op
{
case
et
.
Freeze
:
//TODO
账户冻结,还需要冻结账户地址相应得资产,这里因为查不到所有token资产,所以只冻结主币
//TODO
冻结操作交给外部其他执行器去控制,处于freeze状态的地址禁止操作
accountM
.
Status
=
et
.
Frozen
coinsAccount
:=
coinsAssetDB
.
LoadExecAccount
(
accountM
.
Addr
,
a
.
execaddr
)
receipt
,
err
:=
coinsAssetDB
.
ExecFrozen
(
accountM
.
Addr
,
a
.
execaddr
,
coinsAccount
.
Balance
)
if
err
!=
nil
{
elog
.
Error
(
"Supervise ExecFrozen"
,
"AccountID"
,
ID
,
"err"
,
err
)
}
logs
=
append
(
logs
,
receipt
.
Logs
...
)
kvs
=
append
(
kvs
,
receipt
.
KV
...
)
case
et
.
UnFreeze
:
accountM
.
Status
=
et
.
Normal
coinsAccount
:=
coinsAssetDB
.
LoadExecAccount
(
accountM
.
Addr
,
a
.
execaddr
)
receipt
,
err
:=
coinsAssetDB
.
ExecActive
(
accountM
.
Addr
,
a
.
execaddr
,
coinsAccount
.
Frozen
)
if
err
!=
nil
{
elog
.
Error
(
"Supervise ExecActive"
,
"AccountID"
,
ID
,
"err"
,
err
)
}
logs
=
append
(
logs
,
receipt
.
Logs
...
)
kvs
=
append
(
kvs
,
receipt
.
KV
...
)
case
et
.
AddExpire
:
cfg
:=
a
.
api
.
GetConfig
()
defaultActiveTime
:=
getConfValue
(
cfg
,
a
.
statedb
,
ConfNameActiveTime
,
DefaultActiveTime
)
...
...
plugin/dapp/exchange/cmd/build.sh
View file @
e4596fe8
...
...
@@ -7,5 +7,5 @@ strapp=${strcmd%/cmd*}
OUT_DIR
=
"
${
1
}
/
$strapp
"
#FLAG=$2
mkdir
-p
"
${
OUT_DIR
}
"
cp
./build/
*
"
${
OUT_DIR
}
"
#
mkdir -p "${OUT_DIR}"
#
cp ./build/* "${OUT_DIR}"
plugin/dapp/storage/cmd/build.sh
View file @
e4596fe8
...
...
@@ -7,5 +7,5 @@ strapp=${strcmd%/cmd*}
OUT_DIR
=
"
${
1
}
/
$strapp
"
#FLAG=$2
mkdir
-p
"
${
OUT_DIR
}
"
cp
./build/
*
"
${
OUT_DIR
}
"
#
mkdir -p "${OUT_DIR}"
#
cp ./build/* "${OUT_DIR}"
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