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
c6e47999
Commit
c6e47999
authored
Jan 27, 2021
by
jiangpeng
Committed by
vipwzw
Jan 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dapp/privacy:remove unnecessary error log(#950)
parent
f9e2f57a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
go.sum
go.sum
+0
-0
privacy.go
plugin/dapp/privacy/wallet/privacy.go
+17
-5
privacystore.go
plugin/dapp/privacy/wallet/privacystore.go
+0
-13
No files found.
go.sum
View file @
c6e47999
This diff is collapsed.
Click to expand it.
plugin/dapp/privacy/wallet/privacy.go
View file @
c6e47999
...
...
@@ -1010,14 +1010,26 @@ func (policy *privacyPolicy) buildAndStoreWalletTxDetail(param *buildStoreWallet
}
func
(
policy
*
privacyPolicy
)
checkExpireFTXOOnTimer
()
{
operater
:=
policy
.
getWalletOperate
()
header
:=
operater
.
GetLastHeader
()
header
:=
policy
.
getWalletOperate
()
.
GetLastHeader
()
if
header
==
nil
{
bizlog
.
Error
(
"checkExpireFTXOOnTimer Can not get last header."
)
return
}
policy
.
store
.
moveFTXO2UTXOWhenFTXOExpire
(
header
.
Height
,
header
.
BlockTime
)
curFTXOTxs
,
keys
:=
policy
.
store
.
getFTXOlist
()
if
len
(
curFTXOTxs
)
==
0
{
return
}
dbbatch
:=
policy
.
store
.
NewBatch
(
true
)
for
i
,
ftxo
:=
range
curFTXOTxs
{
if
!
ftxo
.
IsExpire
(
header
.
GetHeight
(),
header
.
GetBlockTime
())
{
continue
}
policy
.
store
.
moveFTXO2UTXO
(
keys
[
i
],
dbbatch
)
bizlog
.
Debug
(
"moveFTXO2UTXOWhenFTXOExpire"
,
"moveFTXO2UTXO key"
,
string
(
keys
[
i
]),
"expire ftxo"
,
ftxo
)
}
err
:=
dbbatch
.
Write
()
if
err
!=
nil
{
bizlog
.
Error
(
"checkExpireFTXOOnTimer"
,
"db write err"
,
err
)
}
}
func
(
policy
*
privacyPolicy
)
checkWalletStoreData
()
{
...
...
plugin/dapp/privacy/wallet/privacystore.go
View file @
c6e47999
...
...
@@ -963,16 +963,3 @@ func (store *privacyStore) moveSTXO2FTXO(tx *types.Transaction, txhash string, n
newbatch
.
Write
()
return
nil
}
func
(
store
*
privacyStore
)
moveFTXO2UTXOWhenFTXOExpire
(
blockheight
,
blocktime
int64
)
{
dbbatch
:=
store
.
NewBatch
(
true
)
curFTXOTxs
,
keys
:=
store
.
getFTXOlist
()
for
i
,
ftxo
:=
range
curFTXOTxs
{
if
!
ftxo
.
IsExpire
(
blockheight
,
blocktime
)
{
continue
}
store
.
moveFTXO2UTXO
(
keys
[
i
],
dbbatch
)
bizlog
.
Debug
(
"moveFTXO2UTXOWhenFTXOExpire"
,
"moveFTXO2UTXO key"
,
string
(
keys
[
i
]),
"ftxo.IsExpire"
,
ftxo
.
IsExpire
(
blockheight
,
blocktime
))
}
dbbatch
.
Write
()
}
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