-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R4R: Allow --from to be a name or an address #2073
Changes from 1 commit
ae91972
cd1cb15
b904fd5
ac4bc2a
81df6f4
9611469
1ee14d5
a24beae
e026164
77f958f
3a6ac88
d89664b
d4ad0ff
ed7d43c
ac3325c
0799aa8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,6 +182,7 @@ func (kb dbKeybase) List() ([]Info, error) { | |
for ; iter.Valid(); iter.Next() { | ||
key := string(iter.Key()) | ||
|
||
// need to exclude any keys in storage that have an address suffix | ||
if strings.HasSuffix(key, ".address") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this needs a comment IMHO There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd say if one needs to write code like ^^^, then something is wrong. Just a earlier warning to core devs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ++ |
||
continue | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a more defensive mechanism would be to:
if strings.HasSuffix(key, infoSuffix) { // read and parse...}