Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
张蕾
Geth-Modification
Commits
1aaa5991
Commit
1aaa5991
authored
Sep 22, 2016
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounts: add Find method
parent
d27472cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
account_manager.go
accounts/account_manager.go
+7
-1
No files found.
accounts/account_manager.go
View file @
1aaa5991
...
@@ -228,11 +228,17 @@ func (am *Manager) TimedUnlock(a Account, passphrase string, timeout time.Durati
...
@@ -228,11 +228,17 @@ func (am *Manager) TimedUnlock(a Account, passphrase string, timeout time.Durati
return
nil
return
nil
}
}
func
(
am
*
Manager
)
getDecryptedKey
(
a
Account
,
auth
string
)
(
Account
,
*
Key
,
error
)
{
// Find resolves the given account into a unique entry in the keystore.
func
(
am
*
Manager
)
Find
(
a
Account
)
(
Account
,
error
)
{
am
.
cache
.
maybeReload
()
am
.
cache
.
maybeReload
()
am
.
cache
.
mu
.
Lock
()
am
.
cache
.
mu
.
Lock
()
a
,
err
:=
am
.
cache
.
find
(
a
)
a
,
err
:=
am
.
cache
.
find
(
a
)
am
.
cache
.
mu
.
Unlock
()
am
.
cache
.
mu
.
Unlock
()
return
a
,
err
}
func
(
am
*
Manager
)
getDecryptedKey
(
a
Account
,
auth
string
)
(
Account
,
*
Key
,
error
)
{
a
,
err
:=
am
.
Find
(
a
)
if
err
!=
nil
{
if
err
!=
nil
{
return
a
,
nil
,
err
return
a
,
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