-
Notifications
You must be signed in to change notification settings - Fork 1k
Implement BIP-0032 #4414
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
Implement BIP-0032 #4414
Conversation
| for (int i = 0; i < count; i++) | ||
| { | ||
| indices[i] = uint.Parse(match.Groups["index"].Captures[i].Value); | ||
| if (indices[i] >= 0x80000000) throw new FormatException(); |
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.
Define 0x80000000 as a constant?
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.
Here, 0x80000000 is a common method for determining whether the highest bit is 1, and it is not a special constant.
| public static KeyPath Parse(string path) | ||
| { | ||
| Match match = KeyPathRegex().Match(path); | ||
| if (!match.Success) throw new FormatException(); |
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.
Add message to throw exception ?
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.
The default message is enough.
ajara87
left a comment
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.
Ported on #4418
No description provided.