Skip to content

Conversation

@erikzhang
Copy link
Member

No description provided.

@github-actions github-actions bot added the N4 label Jan 5, 2026
@shargon shargon added the Port-to-3.x Feature or PR must be ported to Neo 3.x branch label Jan 5, 2026
for (int i = 0; i < count; i++)
{
indices[i] = uint.Parse(match.Groups["index"].Captures[i].Value);
if (indices[i] >= 0x80000000) throw new FormatException();
Copy link
Contributor

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?

Copy link
Member Author

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();
Copy link
Contributor

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 ?

Copy link
Member Author

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 ajara87 mentioned this pull request Jan 6, 2026
Copy link
Member

@ajara87 ajara87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ported on #4418

@erikzhang erikzhang merged commit acc906e into neo-project:master Jan 7, 2026
7 checks passed
@erikzhang erikzhang deleted the bip-0032 branch January 7, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

N4 Port-to-3.x Feature or PR must be ported to Neo 3.x branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants