Open
Conversation
Adds new RPC command to query delegate authorization for a specific fluxnode collateral. Returns delegate version, type, and list of authorized public keys. Usage: listfluxnodedelegates "txhash" "outputindex" Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…nt nodes ReadFluxnodeDelegates was returning true when delegate data didn't exist in the database, causing listfluxnodedelegates to report has_delegates=true for any outpoint, even non-existent ones. Changed to return false when delegate data is not found, so the RPC correctly reports has_delegates=false for outpoints without delegates. This also improves behavior in other call sites: - Block undo: both old and new code handle missing undo entries identically - startfluxnodeasdelegate: clearer error message when no delegates exist - Signature verification: no functional change (same code path) This is a non-consensus change that only affects RPC output accuracy. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add proper validation for transaction hash and output index parameters: - Transaction hash: Validate it's exactly 64 hex characters using IsHex() - Output index: Use stoul() instead of stoi() to handle full uint32_t range (0 to 4,294,967,295) and explicitly check against maximum value Uses the same error handling pattern as other Fluxnode RPCs in this file (startfluxnodeasdelegate, startp2shasdelegate) - returns error objects instead of throwing exceptions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
New RPC endpoint to see if an Outpoint has delegates. Uses the same style as other methods in
fluxnode.cpp