Skip to content

signer list set quorum fix#96

Merged
florent-uzio merged 6 commits intoXRPLF:v0.1.xfrom
florent-uzio:fix/quorum
Feb 7, 2025
Merged

signer list set quorum fix#96
florent-uzio merged 6 commits intoXRPLF:v0.1.xfrom
florent-uzio:fix/quorum

Conversation

@florent-uzio
Copy link

Title

Description

This PR aims to:

  • Updated SignerQuorum in SignerListSet to be a pointer (*uint32) instead of a value (uint32).
    • This allows distinguishing between an unset (nil) and an explicitly set value, including 0 to delete a signer list.
    • Ensures SignerQuorum is only included in the Flatten() output when explicitly defined.
    • Updates the Validate method to make sure SignerEntries is not set when SignerQuorum is set to 0

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where needed
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes

Changes

  • Change 1: SignerQuorum in SignerListSet to be a pointer (*uint32) instead of a value (uint32).
  • Change 2: New error ErrInvalidQuorumAndEntries introduced

Notes (optional)

Describe any additional notes here.

Copy link
Collaborator

@GuillemGarciaDev GuillemGarciaDev left a comment

Choose a reason for hiding this comment

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

I refactored the SignerQuorum type to interface{} with uint32 type assertion in order to improve the developer experience.

@florent-uzio florent-uzio merged commit 07353d6 into XRPLF:v0.1.x Feb 7, 2025
4 checks passed
@florent-uzio florent-uzio deleted the fix/quorum branch February 7, 2025 06:46
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.

2 participants