Fix rapid stake table display: convert binary address to hex string in node_id #223
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes garbled/corrupted Node ID display in the rapid stake table UI. The
node_idfield inmxd_node_stake_tis achar[64]meant for hex string representation, butmxd_apply_membership_deltaswas incorrectly copying 20 bytes of binary address data directly into it usingmemcpy. This caused the UI to display garbage characters like "!djE=h§4L" instead of proper hex addresses.The fix converts the binary address to a 40-character hex string using
snprintfand also populates thenode_addressfield with the binary data for direct comparisons.Review & Testing Checklist for Human
grep -n "memcpy.*node_id" src/to check if other code paths incorrectly copy binary data intonode_idnode_addresshere doesn't conflict with existing code that may have expected it to be unset or set elsewherestrcmp(node_id, ...)comparisons still work correctly with the hex string formatNotes
Bug was reported by user with screenshot showing corrupted Node IDs in the rapid stake table display. The existing code at line 1134 already uses
memcmponnode_addressfor comparisons, so setting that field here is consistent with the existing lookup logic.Link to Devin run: https://app.devin.ai/sessions/f0a6357d898e440ea3745d77dfb91d8d
Requested by: Runo (runonetworks@gmail.com) / @AlanRuno