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
ed69766b
Commit
ed69766b
authored
Jan 15, 2020
by
heyubin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add by hyb for wallet mtx
parent
90d2f148
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
26 deletions
+4
-26
exec.go
plugin/dapp/multisig/wallet/exec.go
+0
-3
exec.go
plugin/dapp/privacy/wallet/exec.go
+3
-16
privacy.go
plugin/dapp/privacy/wallet/privacy.go
+0
-2
privacybizpolicy_test.go
plugin/dapp/privacy/wallet/privacybizpolicy_test.go
+0
-3
ticket.go
plugin/dapp/ticket/wallet/ticket.go
+1
-2
No files found.
plugin/dapp/multisig/wallet/exec.go
View file @
ed69766b
...
...
@@ -10,9 +10,6 @@ import (
//On_MultiSigAddresList 获取owner对应的多重签名地址列表
func
(
policy
*
multisigPolicy
)
On_MultiSigAddresList
(
req
*
types
.
ReqString
)
(
types
.
Message
,
error
)
{
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
//获取本钱包中记录的所有多重签名地址
if
req
.
Data
==
""
{
reply
,
err
:=
policy
.
store
.
listOwnerAttrs
()
...
...
plugin/dapp/privacy/wallet/exec.go
View file @
ed69766b
...
...
@@ -10,8 +10,6 @@ import (
)
func
(
policy
*
privacyPolicy
)
On_ShowPrivacyAccountSpend
(
req
*
privacytypes
.
ReqPrivBal4AddrToken
)
(
types
.
Message
,
error
)
{
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
reply
,
err
:=
policy
.
showPrivacyAccountsSpend
(
req
)
if
err
!=
nil
{
bizlog
.
Error
(
"showPrivacyAccountsSpend"
,
"err"
,
err
.
Error
())
...
...
@@ -20,8 +18,6 @@ func (policy *privacyPolicy) On_ShowPrivacyAccountSpend(req *privacytypes.ReqPri
}
func
(
policy
*
privacyPolicy
)
On_ShowPrivacyKey
(
req
*
types
.
ReqString
)
(
types
.
Message
,
error
)
{
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
reply
,
err
:=
policy
.
showPrivacyKeyPair
(
req
)
if
err
!=
nil
{
bizlog
.
Error
(
"showPrivacyKeyPair"
,
"err"
,
err
.
Error
())
...
...
@@ -30,6 +26,7 @@ func (policy *privacyPolicy) On_ShowPrivacyKey(req *types.ReqString) (types.Mess
}
func
(
policy
*
privacyPolicy
)
On_CreateTransaction
(
req
*
privacytypes
.
ReqCreatePrivacyTx
)
(
types
.
Message
,
error
)
{
ok
,
err
:=
policy
.
getWalletOperate
()
.
CheckWalletStatus
()
if
!
ok
{
bizlog
.
Error
(
"createTransaction"
,
"CheckWalletStatus cause error."
,
err
)
...
...
@@ -57,8 +54,6 @@ func (policy *privacyPolicy) On_CreateTransaction(req *privacytypes.ReqCreatePri
bizlog
.
Error
(
"createTransaction"
,
"isRescanUtxosFlagScaning cause error."
,
err
)
return
nil
,
err
}
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
reply
,
err
:=
policy
.
createTransaction
(
req
)
if
err
!=
nil
{
...
...
@@ -68,8 +63,6 @@ func (policy *privacyPolicy) On_CreateTransaction(req *privacytypes.ReqCreatePri
}
func
(
policy
*
privacyPolicy
)
On_ShowPrivacyAccountInfo
(
req
*
privacytypes
.
ReqPPrivacyAccount
)
(
types
.
Message
,
error
)
{
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
reply
,
err
:=
policy
.
getPrivacyAccountInfo
(
req
)
if
err
!=
nil
{
bizlog
.
Error
(
"getPrivacyAccountInfo"
,
"err"
,
err
.
Error
())
...
...
@@ -78,6 +71,7 @@ func (policy *privacyPolicy) On_ShowPrivacyAccountInfo(req *privacytypes.ReqPPri
}
func
(
policy
*
privacyPolicy
)
On_PrivacyTransactionList
(
req
*
privacytypes
.
ReqPrivacyTransactionList
)
(
types
.
Message
,
error
)
{
if
req
.
Direction
!=
0
&&
req
.
Direction
!=
1
{
bizlog
.
Error
(
"getPrivacyTransactionList"
,
"invalid direction "
,
req
.
Direction
)
return
nil
,
types
.
ErrInvalidParam
...
...
@@ -90,9 +84,6 @@ func (policy *privacyPolicy) On_PrivacyTransactionList(req *privacytypes.ReqPriv
}
req
.
SendRecvFlag
=
sendRecvFlag
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
reply
,
err
:=
policy
.
store
.
getWalletPrivacyTxDetails
(
req
)
if
err
!=
nil
{
bizlog
.
Error
(
"getWalletPrivacyTxDetails"
,
"err"
,
err
.
Error
())
...
...
@@ -101,8 +92,7 @@ func (policy *privacyPolicy) On_PrivacyTransactionList(req *privacytypes.ReqPriv
}
func
(
policy
*
privacyPolicy
)
On_RescanUtxos
(
req
*
privacytypes
.
ReqRescanUtxos
)
(
types
.
Message
,
error
)
{
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
reply
,
err
:=
policy
.
rescanUTXOs
(
req
)
if
err
!=
nil
{
bizlog
.
Error
(
"rescanUTXOs"
,
"err"
,
err
.
Error
())
...
...
@@ -111,9 +101,6 @@ func (policy *privacyPolicy) On_RescanUtxos(req *privacytypes.ReqRescanUtxos) (t
}
func
(
policy
*
privacyPolicy
)
On_EnablePrivacy
(
req
*
privacytypes
.
ReqEnablePrivacy
)
(
types
.
Message
,
error
)
{
operater
:=
policy
.
getWalletOperate
()
operater
.
GetMutex
()
.
Lock
()
defer
operater
.
GetMutex
()
.
Unlock
()
reply
,
err
:=
policy
.
enablePrivacy
(
req
)
if
err
!=
nil
{
bizlog
.
Error
(
"enablePrivacy"
,
"err"
,
err
.
Error
())
...
...
plugin/dapp/privacy/wallet/privacy.go
View file @
ed69766b
...
...
@@ -1008,8 +1008,6 @@ func (policy *privacyPolicy) buildAndStoreWalletTxDetail(param *buildStoreWallet
func
(
policy
*
privacyPolicy
)
checkExpireFTXOOnTimer
()
{
operater
:=
policy
.
getWalletOperate
()
operater
.
GetMutex
()
.
Lock
()
defer
operater
.
GetMutex
()
.
Unlock
()
header
:=
operater
.
GetLastHeader
()
if
header
==
nil
{
...
...
plugin/dapp/privacy/wallet/privacybizpolicy_test.go
View file @
ed69766b
...
...
@@ -119,9 +119,6 @@ func (mock *testDataMock) initMember() {
func
(
mock
*
testDataMock
)
importPrivateKey
(
PrivKey
*
types
.
ReqWalletImportPrivkey
)
{
wallet
:=
mock
.
wallet
wallet
.
GetMutex
()
.
Lock
()
defer
wallet
.
GetMutex
()
.
Unlock
()
ok
,
err
:=
wallet
.
CheckWalletStatus
()
if
!
ok
||
err
!=
nil
{
return
...
...
plugin/dapp/ticket/wallet/ticket.go
View file @
ed69766b
...
...
@@ -448,8 +448,7 @@ func (policy *ticketPolicy) getTicketsByStatus(status int32) ([]*ty.Ticket, [][]
if
err
!=
nil
{
return
nil
,
nil
,
err
}
operater
.
GetMutex
()
.
Lock
()
defer
operater
.
GetMutex
()
.
Unlock
()
ok
,
err
:=
operater
.
CheckWalletStatus
()
if
!
ok
&&
err
!=
types
.
ErrOnlyTicketUnLocked
{
return
nil
,
nil
,
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