Skip to content
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

networkID from /ext/info is a string #857

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

msmania
Copy link

@msmania msmania commented Apr 19, 2024

On AvalancheGo side, the method info.getNetworkID returns the networkID field as a string as it's marshaled from json.Uint32 (defined here). In the client side, however, we receive it as a number. With this miscast, the client accidentally considers the returned network ID as a hex string, and thus a submitted tx is always rejected due to network id mismatch. For example, when the client sends a tx to Local Network (id=1337), it sets networkID to 0x1337.

The proposed fix is to change the type of networkID from number to string to match AvalancheGo implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant