File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ func (ac *addrCache) scan() ([]Account, error) {
225
225
buf = new (bufio.Reader )
226
226
addrs []Account
227
227
keyJSON struct {
228
- Address common. Address `json:"address"`
228
+ Address string `json:"address"`
229
229
}
230
230
)
231
231
for _ , fi := range files {
@@ -241,15 +241,16 @@ func (ac *addrCache) scan() ([]Account, error) {
241
241
}
242
242
buf .Reset (fd )
243
243
// Parse the address.
244
- keyJSON .Address = common. Address {}
244
+ keyJSON .Address = ""
245
245
err = json .NewDecoder (buf ).Decode (& keyJSON )
246
+ addr := common .HexToAddress (keyJSON .Address )
246
247
switch {
247
248
case err != nil :
248
249
glog .V (logger .Debug ).Infof ("can't decode key %s: %v" , path , err )
249
- case (keyJSON . Address == common.Address {}):
250
+ case (addr == common.Address {}):
250
251
glog .V (logger .Debug ).Infof ("can't decode key %s: missing or zero address" , path )
251
252
default :
252
- addrs = append (addrs , Account {Address : keyJSON . Address , File : path })
253
+ addrs = append (addrs , Account {Address : addr , File : path })
253
254
}
254
255
fd .Close ()
255
256
}
You can’t perform that action at this time.
0 commit comments