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
15eee47e
Commit
15eee47e
authored
Mar 06, 2019
by
Matthew Halpern
Committed by
Péter Szilágyi
Mar 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounts: prefer nil slices over zero-length slices (#19079)
parent
34c85def
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
keystore.go
accounts/keystore/keystore.go
+4
-2
hub.go
accounts/usbwallet/hub.go
+4
-2
No files found.
accounts/keystore/keystore.go
View file @
15eee47e
...
@@ -137,8 +137,10 @@ func (ks *KeyStore) refreshWallets() {
...
@@ -137,8 +137,10 @@ func (ks *KeyStore) refreshWallets() {
accs
:=
ks
.
cache
.
accounts
()
accs
:=
ks
.
cache
.
accounts
()
// Transform the current list of wallets into the new one
// Transform the current list of wallets into the new one
wallets
:=
make
([]
accounts
.
Wallet
,
0
,
len
(
accs
))
var
(
events
:=
[]
accounts
.
WalletEvent
{}
wallets
=
make
([]
accounts
.
Wallet
,
0
,
len
(
accs
))
events
[]
accounts
.
WalletEvent
)
for
_
,
account
:=
range
accs
{
for
_
,
account
:=
range
accs
{
// Drop wallets while they were in front of the next account
// Drop wallets while they were in front of the next account
...
...
accounts/usbwallet/hub.go
View file @
15eee47e
...
@@ -150,8 +150,10 @@ func (hub *Hub) refreshWallets() {
...
@@ -150,8 +150,10 @@ func (hub *Hub) refreshWallets() {
// Transform the current list of wallets into the new one
// Transform the current list of wallets into the new one
hub
.
stateLock
.
Lock
()
hub
.
stateLock
.
Lock
()
wallets
:=
make
([]
accounts
.
Wallet
,
0
,
len
(
devices
))
var
(
events
:=
[]
accounts
.
WalletEvent
{}
wallets
=
make
([]
accounts
.
Wallet
,
0
,
len
(
devices
))
events
[]
accounts
.
WalletEvent
)
for
_
,
device
:=
range
devices
{
for
_
,
device
:=
range
devices
{
url
:=
accounts
.
URL
{
Scheme
:
hub
.
scheme
,
Path
:
device
.
Path
}
url
:=
accounts
.
URL
{
Scheme
:
hub
.
scheme
,
Path
:
device
.
Path
}
...
...
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