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
26cd41f0
Unverified
Commit
26cd41f0
authored
Feb 09, 2017
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounts/usbwallet: make wallet responsive while Ledger is busy
parent
fb198468
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
317 additions
and
151 deletions
+317
-151
ledger_wallet.go
accounts/usbwallet/ledger_wallet.go
+309
-151
main.go
cmd/geth/main.go
+8
-0
No files found.
accounts/usbwallet/ledger_wallet.go
View file @
26cd41f0
This diff is collapsed.
Click to expand it.
cmd/geth/main.go
View file @
26cd41f0
...
@@ -269,6 +269,13 @@ func startNode(ctx *cli.Context, stack *node.Node) {
...
@@ -269,6 +269,13 @@ func startNode(ctx *cli.Context, stack *node.Node) {
}
}
stateReader
:=
ethclient
.
NewClient
(
rpcClient
)
stateReader
:=
ethclient
.
NewClient
(
rpcClient
)
// Open and self derive any wallets already attached
for
_
,
wallet
:=
range
stack
.
AccountManager
()
.
Wallets
()
{
if
err
:=
wallet
.
Open
(
""
);
err
!=
nil
{
glog
.
V
(
logger
.
Warn
)
.
Infof
(
"Failed to open wallet %s: %v"
,
wallet
.
URL
(),
err
)
}
wallet
.
SelfDerive
(
accounts
.
DefaultBaseDerivationPath
,
stateReader
)
}
// Listen for wallet event till termination
// Listen for wallet event till termination
for
event
:=
range
events
{
for
event
:=
range
events
{
if
event
.
Arrive
{
if
event
.
Arrive
{
...
@@ -280,6 +287,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
...
@@ -280,6 +287,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
event
.
Wallet
.
SelfDerive
(
accounts
.
DefaultBaseDerivationPath
,
stateReader
)
event
.
Wallet
.
SelfDerive
(
accounts
.
DefaultBaseDerivationPath
,
stateReader
)
}
else
{
}
else
{
glog
.
V
(
logger
.
Info
)
.
Infof
(
"Old wallet dropped: %s"
,
event
.
Wallet
.
URL
())
glog
.
V
(
logger
.
Info
)
.
Infof
(
"Old wallet dropped: %s"
,
event
.
Wallet
.
URL
())
event
.
Wallet
.
Close
()
}
}
}
}
}()
}()
...
...
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