Skip to content

fix: assign network value to get info response - #54

Open
secretnamebasis wants to merge 1 commit into
DEROFDN:community-mainnetfrom
secretnamebasis:fix/assign_network_value_to_get_info
Open

fix: assign network value to get info response#54
secretnamebasis wants to merge 1 commit into
DEROFDN:community-mainnetfrom
secretnamebasis:fix/assign_network_value_to_get_info

Conversation

@secretnamebasis

Copy link
Copy Markdown

Description

GetInfo's RPC handler only ever assigns result.Network inside the globals.IsSimulator() branch ("Simulator") — there's no corresponding branch for a real mainnet or testnet node, so Network is left as an empty string for every non-simulator daemon. This fix adds the missing else if globals.IsMainnet() / else branches so a real node correctly reports "Mainnet" or "Testnet".

Directly observed independently: running get info through a wallet client against a live mainnet node returned a completely blank Network: field, while every other GetInfo_Result field (height, difficulty, version, etc.) was populated normally — isolating the bug to this one unset field rather than a broader RPC failure.

Fixes # (no tracked issue number)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This will require a HardFork to be enabled

Which part is impacted?

  • Wallet
  • Daemon
  • Miner
  • Explorer
  • Simulator
  • Misc (documentation, comments, text...)

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas (four-line, self-explanatory change; no new comments needed)
  • My changes generate no new warnings

License

I am contributing & releasing the code under DERO Research License (which can be found here).

@secretnamebasis secretnamebasis changed the title fix: assing network value to get info response fix: assign network value to get info response Jul 22, 2026
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